You could calculate the candle time (something like CurTime() - opening_time) or exit on the first tick of the next candle (should just be one tick difference) based on Volume[0]==1.
Markus
Markus
ok thanks markus. I was guessing, it was easier ^^
Use iBars() to count the number of bars on the chart. If the number has increased by 1 since the last count then thats a new bar close.
best to compare with: iBars()!=iPreviousBars

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
how can i code that?