I would like to exit the trade, say, 14 days after entry...... (14 or 20 or 30 days, variable)
Which code block would allow me to set that up.
Thanks
Which code block would allow me to set that up.
Thanks
US30 MQL5 Expert Advisor Results 2 replies
Expert Advisor Builder 117 replies
Expert Advisor Builder 7 replies
MetaTrader Expert Advisor BUILDER for backtesting and auto trading 4 replies
Expert Advisor Builder Help 2 replies
DislikedI would like to exit the trade, say, 14 days after entry...... (14 or 20 or 30 days, variable)
Which code block would allow me to set that up.
ThanksIgnored
DislikedHi,
First you need to know Deal Time, so you would select Trade->Trading Functions -> OrderGetInteger and change property_id to ORDER_TIME_DONE which is the order execution time.
Second you need current time, so you use TimeSeries->Time Current
Third you need to compare the two so you need to use if-else, plus or minus, and Logic->value boxes (to input 14 days in seconds).Ignored
DislikedIs it possible to ad custom indicators in the MT4 version?
KristjanIgnored