
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
My Expert generates a few signals, but I would like to make the validity of these signals on 5 or 7 bars (the signal should be not valid after 5th or 7th bar).
I 've added the NewBar function to my expert, but I am not sure if that function will be good tested on Meta Trader using the Back Tester.
extern datetime PreviousBar;
init() {}
deinit() {}
start() {...}
bool NewBar()
{
if(PreviousBar<Time[0])
{
PreviousBar = Time[0];
return(true);
}
else
{
return(false);
}
return(false); // in case if - else statement is not executed
}
Have anybody any good idea how to properly back test the experts where are used in the Time[] functions ?
Or replace the NewBar() function the other function or variable ?