I test my EA based on 5 min period chart, but

To add comments, please log in or register
up10
78
up10  

the result is that huge amount of trades occur and each of them was opened and closed within 1 min. What might caused the problem? I am driven crazy....

Brian Dee - Random Trader
1759
Brian Dee - Random Trader  

Sounds like your EA is opening each tick, hitting a stop & opening again instead of waiting for the next bar to evaluate trade or no trade?

Post your code

-BB-

up10
78
up10  

Thanks, but how can I let the EA make evaluation only at the beginning of each bar appears?

Brian Dee - Random Trader
1759
Brian Dee - Random Trader  


Add this line in the start() function, below the section that you want to execute once every tick

if (Volume[0]>1) return(0);

anything below this line of code then only gets executed once per bar on the first tick of that bar

Good luck

-BB-

up10
78
up10  
Resolved. Thanks Barrow!
To add comments, please log in or register