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 have been having a lot of trouble when making this EA. I want to create a simple reversal bar strategy that enters when parameters are met and exits when a new bar is formed. If I get stopped out I want to take an opposite order(attempted in the for loop code block). I have been having trouble using the timecurrent function in the backtest because it throws Unmatched data errors. I was using it as a way to determine if the current time compared to the orderopentime + its period. How can i get around using the timecurrent function with a simple code to detect a new bar?Would i apply a while loop to it? When i look for previous orders to see if it was stopped out, am I correct by iterating through it? The period function multiplies the period() by 60 unless it is a 1 min timeframe then it adds 59 to the period. I appreciate your help!!