maarty:
i'm sorry but i'm still begginer in programing - so it may seems very simple for you...
How can i do something like:
if(true)
{
BUY else SELL - no matter
WAIT FOR NEXT BAR - this is important
}
because between bars should be the condition changed many times :(
So, can i forbid the int start() to solve the conditions in one bar again and again? Or is there some other way how to prevent it to make 50 trades at same bar?
I've tried to use the Sleep() function, but it doesn't seemed to work :(
Many Thanks
maarty
You can probably use some variation of this:
static datetime barTime;
if(true && barTime != Time[i])
{
BUY else SELL - no matter
WAIT FOR NEXT BAR - this is important
barTime = Time[i];
}

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'm sorry but i'm still begginer in programing - so it may seems very simple for you...
How can i do something like:
if(true)
{
BUY else SELL - no matter
WAIT FOR NEXT BAR - this is important
}
because between bars should be the condition changed many times :(
So, can i forbid the int start() to solve the conditions in one bar again and again? Or is there some other way how to prevent it to make 50 trades at same bar?
I've tried to use the Sleep() function, but it doesn't seemed to work :(
Many Thanks
maarty