iHighest backtesting problem - page 2

 
pontuso:

The highest value between 1 - 20 bars back, but it shall be calculated om m30 timeframe


You are missing the point

What do you get from this?

double =High[iHighest(NULL,30,MODE_HIGH,20,1)];

You are expecting the highest high of the last 20 bars from the M30 chart - Yes?

Now say, for example, that the shift of the bar with the highest high on the M30 chart is 16, 8 hours ago

Your code will return the high of the bar shift 16 on the current time-frame, so on H1 chart it will return the high of the bar 16 hours ago

On H4 chart 64 hours ago

On Daily chart 16 trading days ago.

 
GumRai:


You are missing the point

What do you get from this?

You are expecting the highest high of the last 20 bars from the M30 chart - Yes?

Now say, for example, that the shift of the bar with the highest high on the M30 chart is 16, 8 hours ago

Your code will return the high of the bar shift 16 on the current time-frame, so on H1 chart it will return the high of the bar 16 hours ago

On H4 chart 64 hours ago

On Daily chart 16 trading days ago.

Aaa okay i understand now sorry for the missunderstanding.

Thanks GumRai!

 
pontuso:

Aaa okay i understand now sorry for the missunderstanding.

Thanks GumRai!



No need to thank me, it was RaptorUK's sharp eyes that spotted it, just you didn't understand his point.
 
GumRai:

No need to thank me, it was RaptorUK's sharp eyes that spotted it, just you didn't understand his point.
Maybe I should have just said use iHigh() instead of High[] but that doesn't get the OP thinking at all . . .
 
RaptorUK:
Maybe I should have just said use iHigh() instead of High[] but that doesn't get the OP thinking at all . . .


I know what you are saying. When I am helping my daughter with her homework, I never just give her the answer when she is stuck, I guide her and make her think for herself. She's top of her class :D
 
RaptorUK:
Maybe I should have just said use iHigh() instead of High[] but that doesn't get the OP thinking at all . . .


NO, keep it your way

although it's sometimes very hard get the OP thinking at all

it will be the best way for the OP to understand the solution you give

You do a good job your way

 
deVries:


NO, keep it your way

although it's sometimes very hard get the OP thinking at all

it will be the best way for the OP to understand the solution you give

You do a good job your way

Thanks for the encouragement
Reason: