Hi. Can anyone tell me why the below code does not place trade arrows correctly. The 'price' placement is fine, but it fails to always place it at the right bar, often placing arrows many bars in the past, not Bar 0, the current bar. btw ArrowNum is of Global Integer type.
- Depth of Market - MetaTrader 5 for iPhone
- Parabolic SAR - Trend Indicators - Technical Indicators - Price Charts, Technical and Fundamental Analysis
- Parabolic SAR - Trend Indicators - Indicators - Charts - MetaTrader 5 for Android
"but it fails to always place it at the right bar"
Does it do this on a new chart, first time you run it?
If no...
Does it do it on an existing chart, particularly after changing timeframe or changing some indicator setting?
If yes...
my guess is you are reusing ArrowNum but not deleting old arrows named with those numbers
Does it do this on a new chart, first time you run it?
If no...
Does it do it on an existing chart, particularly after changing timeframe or changing some indicator setting?
If yes...
my guess is you are reusing ArrowNum but not deleting old arrows named with those numbers
"but it fails to always place it at the right bar"
Does it do this on a new chart, first time you run it?
If no...
Does it do it on an existing chart, particularly after changing timeframe or changing some indicator setting?
If yes...
my guess is you are reusing ArrowNum but not deleting old arrows named with those numbers
Does it do this on a new chart, first time you run it?
If no...
Does it do it on an existing chart, particularly after changing timeframe or changing some indicator setting?
If yes...
my guess is you are reusing ArrowNum but not deleting old arrows named with those numbers
It always works fine initially on a new chart but then stops after awhile. I think you may be right - I included the following line and it seems to be behaving properly now. Many thanks!
while (ObjectFind("TradeArrow"+ArrowNum) > 0) ArrowNum++;
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