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
Always use
in your codes so that you don't get into the habit of writing sloppy code that tries to retrieve values from a bar that doesn't exist.
You are not getting the iCustom value that you expect, because you are only calling it from your EA when a new bar opens, but the indicator draws the arrow sometime after the new bar has opened.
Always use
in your codes so that you don't get into the habit of writing sloppy code that tries to retrieve values from a bar that doesn't exist.
You are not getting the iCustom value that you expect, because you are only calling it from your EA when a new bar opens, but the indicator draws the arrow sometime after the new bar has opened.
Confirm I am using #Property Strict.
Can you confirm why you say I am only calling it from the EA when a new bar opens?
I ask because when I watch what happens in 'real time' in strategy tester, the price goes forward by 4 points on the current building candle, the Indicator puts entry arrow next to that candle at the correct point, nothing happens but immediately that candle finally completes it opens the trade!
Confirm I am using #Property Strict.
Can you confirm why you say I am only calling it from the EA when a new bar opens?
Maybe you don't as you do not include the complete block of code, but it is reasonable to assume that you update candletime.
That is REALLY clever!
I have tried it on strategy tester, it took me a while to figure out how to control it but it correctly shows the Arrow Buffer value is the same as the entry arrow on the chart, on the candle it is placed.
It also confirms when the Arrow Buffer becomes empty i.e when that candle closes and the value goes back to 2147483647.00000000
So it seems to be working correctly, bonus.
Maybe you don't as you do not include the complete block of code, but it is reasonable to assume that you update candletime.
At the end of the four entry options I am using (Bull or Bear for each Indicator) I have the following.
Comment(" ");
candletime=Time[0];
Which is meant to stop multiple entry attempts on the same candle however I am also using.
total=OrdersTotal(); if(total<1) EnterTrade(OP_BUY);