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 not sure "15" will be understood as the 15 minute timeframe, you should use "PERIOD_M15" constant
That is nonsense. You start a loop, then assign zero to i to select the oldest position, the loop exits after that.
Expert Placing one pair stoploss on other pair. - MQL4 programming forum - Page 2 #17 (2020)
You should be able to read your code out loud and have it make sense. You would never write if( (2+2 == 4) == true) would you? if(2+2 == 4) is sufficient. So don't write if(bool == true), just use if(bool) or if(!bool).
That is nonsense. You start a loop, then assign zero to i to select the oldest position, the loop exits after that.
Expert Placing one pair stoploss on other pair. - MQL4 programming forum - Page 2 #17 (2020)
You should be able to read your code out loud and have it make sense. You would never write if( (2+2 == 4) == true) would you? if(2+2 == 4) is sufficient. So don't write if(bool == true), just use if(bool) or if(!bool).
That is nonsense. You start a loop, then assign zero to i to select the oldest position, the loop exits after that.
Expert Placing one pair stoploss on other pair. - MQL4 programming forum - Page 2 #17 (2020)
You should be able to read your code out loud and have it make sense. You would never write if( (2+2 == 4) == true) would you? if(2+2 == 4) is sufficient. So don't write if(bool == true), just use if(bool) or if(!bool).
I have shifts of 0 and 1 for each ma. Im not sure really about ontick and how it works and event thing. Should i use just ontick for two events happening. Thank you for understanding. To tell you honestly, there are some explanation that i dont really understand but I appreaciate everyone here and thank you for helping me out.
I have shifts of 0 and 1 for each ma. Im not sure really about ontick and how it works and event thing. Should i use just ontick for two events happening. Thank you for understanding. To tell you honestly, there are some explanation that i dont really understand but I appreaciate everyone here and thank you for helping me out.
An event is a change in price … every time there is an event, OnTick() function will run once. So all the code you want to run at a price change, you should put it inside OnTick(). If within one minute there is 1000 times price changes, OnTick() function will run 1000 times .
Thank you very much. Can ontick wait for the second event to happen? Or after first then check second event if it is not true then it will go back to the top of the code again.