stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

Slopey Slope
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=745
Page 2 of 9
Author:  hilavoku [ Thu Aug 09, 2012 5:52 am ]
Post subject:  Re: Slopey Slope

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?
Author:  harry45 [ Thu Aug 09, 2012 6:59 am ]
Post subject:  Re: Slopey Slope

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?
Author:  hilavoku [ Sun Aug 12, 2012 3:17 pm ]
Post subject:  Re: Slopey Slope

Hi Steve,

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

OldBarTime = iTime(NULL, HtfTimeFrame, 0);

Is this Htf right? Shouldn't it be 'TradingTimeFrame' ?
Author:  SteveHopwood [ Sun Aug 12, 2012 3:32 pm ]
Post subject:  Re: Slopey Slope

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
Author:  harry45 [ Sun Aug 12, 2012 4:01 pm ]
Post subject:  Re: Slopey Slope

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.
Author:  hilavoku [ Sun Aug 12, 2012 8:42 pm ]
Post subject:  Re: Slopey Slope

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
Author:  blahn [ Mon Aug 13, 2012 10:23 pm ]
Post subject:  Re: Slopey Slope

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. :?
Author:  SteveHopwood [ Mon Aug 13, 2012 10:33 pm ]
Post subject:  Re: Slopey Slope

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
Author:  SteveHopwood [ Mon Aug 13, 2012 10:45 pm ]
Post subject:  Re: Slopey Slope

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
Author:  hilavoku [ Wed Aug 15, 2012 8:41 pm ]
Post subject:  Re: Slopey Slope

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
All times are UTC Page 2 of 9