
Ti stai perdendo delle opportunità di trading:
- App di trading gratuite
- Oltre 8.000 segnali per il copy trading
- Notizie economiche per esplorare i mercati finanziari
Registrazione
Accedi
Accetti la politica del sito e le condizioni d’uso
Se non hai un account, registrati
Hi, can anyone help me? I use a martingale system. I would like to change that the first 2 positions instead of opening 0.01 0.02 0.03 I would like it to open 0.01 0.01 and then subsequently 0.02 0.03. How can I change my code?
if(STEP_ORDERS>0)
{
if(BUYS>0 && BUYS<MAX_ORDERS)
{
int STEP = MathMin(STEP_ORDERS,MAX_STEP);
if(STEP_MULTIPLIER>1 && BUYS>1)
STEP = (int)(MathMin((BUYS-1)*STEP_MULTIPLIER*STEP_ORDERS,MAX_STEP));
double LOT = START_LOT;//AccountBalance()/BALANCE*LOT_FOR_BALANCE;
if(LOT_MULTIPLIER>1 && BUYS>0)
LOT = MathMin(LAST_BUY_LOT*LOT_MULTIPLIER,MAX_LOT);
GRID_BUY_PRICE = LAST_BUY_PRICE-STEP*_Point;
if(SymbolInfoDouble(_Symbol,SYMBOL_ASK)<=GRID_BUY_PRICE && CLOSE_ALL==false && CLOSE_BUY==false)
ORDER_SEND(OP_BUY,LOT,ORDERS_COMMENT,MAGIC_NUMBER);
}
//---
if(SELLS>0 && SELLS<MAX_ORDERS)
{
int STEP = MathMin(STEP_ORDERS,MAX_STEP);
if(STEP_MULTIPLIER>1 && SELLS>1)
STEP = (int)(MathMin((SELLS-1)*STEP_MULTIPLIER*STEP_ORDERS,MAX_STEP));
double LOT = START_LOT;//AccountBalance()/BALANCE*LOT_FOR_BALANCE;
if(LOT_MULTIPLIER>1 && SELLS>0)
LOT = MathMin(LAST_SELL_LOT*LOT_MULTIPLIER,MAX_LOT);
GRID_SELL_PRICE = LAST_SELL_PRICE+STEP*_Point;
if(SymbolInfoDouble(_Symbol,SYMBOL_BID)>=GRID_SELL_PRICE && CLOSE_ALL==false && CLOSE_SELL==false)
ORDER_SEND(OP_SELL,LOT,ORDERS_COMMENT,MAGIC_NUMBER);
}
}