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
OMG i have found the error, i was declaring time out from Ordertime function and inside of the function so the programm was taking the out one making the value = 0
3 hours to see the error i want to head shot :O
Well guys i have to write you again, now that case is insane because i have traced everything, the time is getting to the function correctly and i cant fix it anyways, im desesperate... The problem is with iBarShift.
I have try the function in another program and is working fine, i paste the code:
Should I use another function?
Hello,
Im trying to make a function which wait running on a loop till the next 10 new bars are created, cus i need to analyze them:
int BarsCount =0;
OrderTime = Time[0];
while(BarsCount <10){
BarsCount = iBarShift(Symbol(),PERIOD_CURRENT,OrderTime);
}
But always get crash at this point while the loop is running, am i doing anything wrong? I just want to wait for the next 10 bars,
I have deleted your new topic which is basically just the same subject, so no need for a new topic.
You have already been given the answer that doesn't involve a loop running needlessly for the duration of 10 bars.