Ahh, so you are saying instead of doing what I am doing now and checking on current vs previous bar, check how ever many bars back I want to check? Good idea actually.... I was thinking some sort of sleep/loop function would have to be made.
I will come back with how it went.
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
Hello guys,
I have the following code. Which works great and does what I want it to - sort of. I am using an indicator that repaints, and as such I want to be able to make it wait 2-3 bars and then recheck the logic to see if cnb < 100 or > 0. If after X amt of bars the logic is still true I would like to act upon it.
Any help would be great. I have looked at the Sleep() function, but have no idea how I would implement it.