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
To get MT to post arrows for past indication of some event I would do something like this...
This all worked well, until I wanted to make it add a variable to the condition. For example, let's say I wanted to add...
This is where I had a hair pulling moment. My arrow indicator was correct, while my string variable wasn't always. After much cursing, I finally came to the conclusion that my loop analyzed the chart from front to back, and therefore it was giving me the first chronological indicator which was available to it. To fix this, I changed my loop to...
... which now reads it correctly.
But here is my issue:
In the first for loop which went backwards, I would get signal generation while the bar was being created -- I could tell because even though the string was incorrect, arrows were still being generated on the chart. For example, if the 2nd bar was positive but then went negative, it would show me the positive indicator, and then take it away once it went negative. The second for loop works correctly; however, it does not show the signal while it is being generated... it will only show the signal after the bar is complete. How do I fix the second loop so that it will show the signal as it is being created?
Thank you.