input by default

Back to topics list To post a new topic, please log in or register
avatar
28
stanislass 2015.11.30 19:22
 
Hello

I want this EA launches with default with Type = NO_ORDER, but each time it launches with the last parameter used.
Is it possible?

Thank you
#property copyright "Copyright 2014, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"
#property strict


input ENUM_TIMEFRAMES TimeSAR = PERIOD_CURRENT;
extern int Offset = 0;
enum choix {BUY = OP_BUY,SELL = OP_SELL,NO_ORDER = 6};
input choix Type = NO_ORDER;
extern double Lot = 0;
extern double Stop = 0;
extern double Take = 0;
extern int Magic = 0;
extern string Info = "SARTrak";
extern int Slippage = 3;

int total;
double ministop,newstop,oldstop=0.0;

//+------------------------------------------------------------------+
//| Expert initialization function                                   |

avatar
872
eevviill 2015.11.30 23:32 #
 
NO_ORDER = 6
maybe 
NO_ORDER = -1
avatar
12985
WHRoeder 2015.12.01 14:39 #
 
stanislass: it launches with the last parameter used.
That is what it does, for objects, indicators, and EAs. Just press the Reset button.

avatar
28
stanislass 2015.12.01 16:33 #
 
WHRoeder:
stanislass: it launches with the last parameter used.
That is what it does, for objects, indicators, and EAs. Just press the Reset button.

OK. So as I understand it, no need to specify a default value.

Thank you
Back to topics list  

To add comments, please log in or register