Slopey Slope

Post Reply
hilavoku
Trader
Posts: 170
Joined: Mon May 28, 2012 7:54 pm
Location: Germany

Re: Slopey Slope

Post by hilavoku »

Hi Steve.

He means that on the EA window it stated that the angle on the lower TF is rising and on the higher TF it is falling but the EA took a trade. I looked at the EA code but haven't found an error. Is this a delay betwenn the on screen info given from the EA and a correspondig TMA indi?

greetz
Guido

PS: @harry. You have a pic where also the TMA true indi is shown. Can you post this?
harry45
Trader
Posts: 158
Joined: Fri Nov 18, 2011 11:36 am
Location: Russia,St.Petersburg

Re: Slopey Slope

Post by harry45 »

hilavoku wrote:Hi Steve.

He means that on the EA window it stated that the angle on the lower TF is rising and on the higher TF it is falling but the EA took a trade. I looked at the EA code but haven't found an error. Is this a delay betwenn the on screen info given from the EA and a correspondig TMA indi?

greetz
Guido

PS: @harry. You have a pic where also the TMA true indi is shown. Can you post this?
You do not have the required permissions to view the files attached to this post.
hilavoku
Trader
Posts: 170
Joined: Mon May 28, 2012 7:54 pm
Location: Germany

Re: Slopey Slope

Post by hilavoku »

Hi Steve,

in the function 'ReadIndicatorValues()' the last line says:

OldBarTime = iTime(NULL, HtfTimeFrame, 0);

Is this Htf right? Shouldn't it be 'TradingTimeFrame' ?
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Re: Slopey Slope

Post by SteveHopwood »

hilavoku wrote:Hi Steve,

in the function 'ReadIndicatorValues()' the last line says:

OldBarTime = iTime(NULL, HtfTimeFrame, 0);

Is this Htf right? Shouldn't it be 'TradingTimeFrame' ?
Nope, but thanks for looking. The filter is to prevent SS calculating the previous candle's slope at every tick - we only need it at the start of a new candle.

:D
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
harry45
Trader
Posts: 158
Joined: Fri Nov 18, 2011 11:36 am
Location: Russia,St.Petersburg

Re: Slopey Slope

Post by harry45 »

SteveHopwood wrote:
hilavoku wrote:Hi Steve,

in the function 'ReadIndicatorValues()' the last line says:

OldBarTime = iTime(NULL, HtfTimeFrame, 0);

Is this Htf right? Shouldn't it be 'TradingTimeFrame' ?
Nope, but thanks for looking. The filter is to prevent SS calculating the previous candle's slope at every tick - we only need it at the start of a new candle.

:D
Steve,is it right EA uses TMA but not TMA True,if we trade using only Slope Angles difference between prev.Slope val. and currentSlope value is a principal point.
Thank You.
hilavoku
Trader
Posts: 170
Joined: Mon May 28, 2012 7:54 pm
Location: Germany

Re: Slopey Slope

Post by hilavoku »

Okay thx for the info. I thought we should only look for new calculation result every start of a new TradingTimeFrame and not the Htf. Will try to understand :)

One more thing. The calculation of the TMA seems not to be right. When i look at the slopevalues and the previous values there don't correspond...
  • 2012.08.12 22:29:01 2012.08.02 18:00 Slopey Slope + Threshold + TMAtrue + TFfix EURUSD,M1: Alert: Ltf threshold ''up'' reached (0.2329) LtfSlopeVal= -0.6414 / PrevLtfSlopeVal= -0.8743
    2012.08.12 22:29:01 2012.08.02 18:00 Slopey Slope + Threshold + TMAtrue + TFfix EURUSD,M1: Alert: Ltf threshold ''up'' reached (0.2271) LtfSlopeVal= -0.6471 / PrevLtfSlopeVal= -0.8743
    2012.08.12 22:29:01 2012.08.02 18:00 Slopey Slope + Threshold + TMAtrue + TFfix EURUSD,M1: Alert: Ltf threshold ''up'' reached (0.2329) LtfSlopeVal= -0.6414 / PrevLtfSlopeVal= -0.8743
    2012.08.12 22:29:01 2012.08.02 18:00 Slopey Slope + Threshold + TMAtrue + TFfix EURUSD,M1: Alert: Ltf threshold ''up'' reached (0.2271) LtfSlopeVal= -0.6471 / PrevLtfSlopeVal= -0.8743
    2012.08.12 22:29:01 2012.08.02 18:00 Slopey Slope + Threshold + TMAtrue + TFfix EURUSD,M1: Alert: Ltf threshold ''up'' reached (0.2329) LtfSlopeVal= -0.6414 / PrevLtfSlopeVal= -0.8743
    2012.08.12 22:29:01 2012.08.02 18:00 Slopey Slope + Threshold + TMAtrue + TFfix EURUSD,M1: Alert: Ltf threshold ''up'' reached (0.2271) LtfSlopeVal= -0.6471 / PrevLtfSlopeVal= -0.8743
    2012.08.12 22:29:01 2012.08.02 18:00 Slopey Slope + Threshold + TMAtrue + TFfix EURUSD,M1: Alert: Ltf threshold ''up'' reached (0.2329) LtfSlopeVal= -0.6414 / PrevLtfSlopeVal= -0.8743
    2012.08.12 22:29:01 2012.08.02 18:00 Slopey Slope + Threshold + TMAtrue + TFfix EURUSD,M1: Alert: Ltf threshold ''up'' reached (0.2271) LtfSlopeVal= -0.6471 / PrevLtfSlopeVal= -0.8743
    2012.08.12 22:29:01 2012.08.02 18:00 Slopey Slope + Threshold + TMAtrue + TFfix EURUSD,M1: Alert: Ltf threshold ''up'' reached (0.2329) LtfSlopeVal= -0.6414 / PrevLtfSlopeVal= -0.8743
    2012.08.12 22:29:01 2012.08.02 18:00 Slopey Slope + Threshold + TMAtrue + TFfix EURUSD,M1: Alert: Ltf threshold ''up'' reached (0.2271) LtfSlopeVal= -0.6471 / PrevLtfSlopeVal= -0.8743
    2012.08.12 22:29:01 2012.08.02 18:00 Slopey Slope + Threshold + TMAtrue + TFfix EURUSD,M1: Alert: Ltf threshold ''up'' reached (0.2329) LtfSlopeVal= -0.6414 / PrevLtfSlopeVal= -0.8743
    2012.08.12 22:29:01 2012.08.02 18:00 Slopey Slope + Threshold + TMAtrue + TFfix EURUSD,M1: Alert: Ltf threshold ''up'' reached (0.2271) LtfSlopeVal= -0.6471 / PrevLtfSlopeVal= -0.8743
    2012.08.12 22:29:01 2012.08.02 18:00 Slopey Slope + Threshold + TMAtrue + TFfix EURUSD,M1: Alert: Ltf threshold ''up'' reached (0.2329) LtfSlopeVal= -0.6414 / PrevLtfSlopeVal= -0.8743
    2012.08.12 22:29:01 2012.08.02 18:00 Slopey Slope + Threshold + TMAtrue + TFfix EURUSD,M1: Alert: Ltf threshold ''up'' reached (0.2271) LtfSlopeVal= -0.6471 / PrevLtfSlopeVal= -0.8743
    2012.08.12 22:29:01 2012.08.02 18:00 Slopey Slope + Threshold + TMAtrue + TFfix EURUSD,M1: Alert: Ltf threshold ''up'' reached (0.2329) LtfSlopeVal= -0.6414 / PrevLtfSlopeVal= -0.8743
Why is the value of the LtfSlopeVal changing every tick but the PrevLtfSlopeVal not? These are the values vor calculating the direction of the slope...


thx in advance Steve
Guido
Last edited by hilavoku on Thu Aug 16, 2012 9:38 am, edited 1 time in total.
blahn
Trader
Posts: 53
Joined: Wed Nov 30, 2011 2:39 am

Re: Slopey Slope

Post by blahn »

slopey pic.gif
Was playing with slopey and noticed that when I turn on useslopevalue, all trade attempts in strategy tester basically stop. I scrolled forward to a short trade and set the triggers to -.4, and the trade conditions line up. Couldn't see anything wrong with the code and even tossing all the variables on the sm screen it looks ok. sendshort just seems to get flipped to false even tho HtfSlopeVal is less than HtfSellLevel, LtfSlopeVal is less than LtfSellLevel and both timeframes are falling. If i put useslopevalue to false all trading starts up again. I think i've gone complety mad. :?
You do not have the required permissions to view the files attached to this post.
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Re: Slopey Slope

Post by SteveHopwood »

hilavoku wrote:Okay thx for the info. I thought we should only look for new calculation result every start of a new TradingTimeFrame and not the Htf. Will try to understand :)

One more thing. The calculation of the TMA seems not to be right. When i look at the slopevalues and the previous values there don't correspond...
  • 2012.08.12 22:29:01 2012.08.02 18:00 Slopey Slope + Threshold + TMAtrue + TFfix EURUSD,M1: Alert: Ltf threshold ''up'' reached (0.2329) LtfSlopeVal= -0.6414 / PrevLtfSlopeVal= -0.8743
    2012.08.12 22:29:01 2012.08.02 18:00 Slopey Slope + Threshold + TMAtrue + TFfix EURUSD,M1: Alert: Ltf threshold ''up'' reached (0.2271) LtfSlopeVal= -0.6471 / PrevLtfSlopeVal= -0.8743
Hehe. Did you really have to upload such a long file? :lol:
Why is the value of the LtfSlopeVal changing every tick but the PrevLtfSlopeVal not? These are the values vor calculating the direction of the slope...
Because PrevLtfSlopeVal refers to the value at the close of the previous candle. We do not need it updating at every tick as it will be the same with every tick.

:D
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Re: Slopey Slope

Post by SteveHopwood »

blahn wrote:
slopey pic.gif
Was playing with slopey and noticed that when I turn on useslopevalue, all trade attempts in strategy tester basically stop. I scrolled forward to a short trade and set the triggers to -.4, and the trade conditions line up. Couldn't see anything wrong with the code and even tossing all the variables on the sm screen it looks ok. sendshort just seems to get flipped to false even tho HtfSlopeVal is less than HtfSellLevel, LtfSlopeVal is less than LtfSellLevel and both timeframes are falling. If i put useslopevalue to false all trading starts up again. I think i've gone complety mad. :?
I have this effect on people.

This is a strange one. I cannot see anything in the code either - and for once my code looks crystal clear.

Are you familiar with the stacking shenanigans we are enduring with Flying Slope? Nobody can find anything wrong with the code, yet the bot refuses to send stack trades and trying to stack eats up peoples' cpu power.

Strange.

:D
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
hilavoku
Trader
Posts: 170
Joined: Mon May 28, 2012 7:54 pm
Location: Germany

Re: Slopey Slope

Post by hilavoku »

Hi Steve.

Sorry for the long post :oops:

Why is the value of the LtfSlopeVal changing every tick but the PrevLtfSlopeVal not? These are the values vor calculating the direction of the slope...

Because PrevLtfSlopeVal refers to the value at the close of the previous candle. We do not need it updating at every tick as it will be the same with every tick.

:D
Thats right but why do i get every tick a different value of LtfSlopeVal? I don't think its the rigth way. I can have a slope value of the last closed bar. Okay but how can i calculate the slope of the 'current' bar when the bar has not closed yet? In my opinion its not reliable cause the value of the slope can change a lot within the current bar till it is closed.

I modifed the 'ReadIndicatorValues()' function as i think it would be right. Would you be so kind to take look? Don't consider the threshold values there represent the hight of the slope change between the last to values.
I added the values OldBarHtfTime and OldBarLtfTime. More important is the variable 'ShiftSlopeVal'. If its set to a value of 1 it means that we take the second last bar for the 'PrevLtfSlopeVal' and the last closed bar for 'LtfSlopeVal'. so we have a synchronized change of both values every time a Ltf bar closes and not every tick.

Hope you can follow my badly written thoughts.


thx in advance
Guido
You do not have the required permissions to view the files attached to this post.
Post Reply

Return to “Automated trading systems”