Hey, guys please help me out with this.
What are you aiming to calculate with this? 30 mins back?
if(OrderGetInteger(ORDER_TIME_SETUP) < TimeCurrent() - 30 * PeriodSeconds(PERIOD_MN1))
Du you know what PERIOD_MN1 means and how long 30 * PeriodSeconds(PERIOD_MN1) will be?
Use the debugger to find out: https://www.mql5.com/en/articles/654 or read the reference: place the cursor on PeriodSeconds and press F1
- www.mql5.com
Du you know what PERIOD_MN1 means and how long 30 * PeriodSeconds(PERIOD_MN1) will be?
Use the debugger to find out: https://www.mql5.com/en/articles/654 or read the reference: place the cursor on PeriodSeconds and press F1
Good point - I misread that as PERIOD_M1
Some brokers do not support expiration time.
if(OrderGetInteger(ORDER_TIME_SETUP) < TimeCurrent() - 30 * PeriodSeconds(PERIOD_MN1))
if(OrderGetInteger(ORDER_TIME_SETUP) < TimeCurrent() - (30 * PeriodSeconds(PERIOD_MN1)))
if(OrderGetInteger(ORDER_TIME_SETUP) < TimeCurrent() - 30 * PeriodSeconds(PERIOD_MN1))
if(OrderGetInteger(ORDER_TIME_SETUP) < TimeCurrent() - (30 * PeriodSeconds(PERIOD_MN1)))
The 2nd one
Perhaps you should read the manual. Precedence Rules - Operations and Expressions - Language Basics - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
How To Ask Questions The Smart Way. (2004)
How To Interpret Answers.
RTFM and STFW: How To Tell You've Seriously Screwed Up.
if(TimeCurrent() - OrderGetInteger(ORDER_TIME_SETUP) >= (30 * PeriodSeconds(PERIOD_MN1)))
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hey, guys please help me out with this.