tzm:
Dear all,
You are drawing the Object on Bar 0 when the High and Low are not yet known, draw it on Bar 1 instead.
Dear all,
I used the following code in my EA to create a text object at a position higher than the current bar's High.
But the output of the text object is always lower than the position specified. ( No objectCreate failure err or ObjectSetText error was reported. ) As shown in the picture below. You can copy the code and compile it as an EA you will see the output during backtest....
May I know what is wrong with my code?Thanks a lot for your time and consideration.
RaptorUK :
You are drawing the Object on Bar 0 when the High and Low are not yet known, draw it on Bar 1 instead.
You are drawing the Object on Bar 0 when the High and Low are not yet known, draw it on Bar 1 instead.
Dear RaptorUK,
You definitely pinpoint the error I made! thank you so much!
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I used the following code in my EA to create a text object at a position higher than the current bar's High.
But the output of the text object is always lower than the position specified. ( No objectCreate failure err or ObjectSetText error was reported. ) As shown in the picture below. You can copy the code and compile it as an EA you will see the output during backtest....
May I know what is wrong with my code?Thanks a lot for your time and consideration.