hock87 wrote: ↑Wed Dec 05, 2018 12:09 pm
Dear Sir,
I have quection how to increased the order???
EX: this EA only open 1 trade, but i want to open more trades (3 orders) at same time.
Thanks.
extern double Lots = 0.01;
extern int StopLoss = 300;
extern int TakeProfit = 50;
int g_bars_92;
bool gi_96 = TRUE;
int init() {
if (Digits == 3 || Digits == 5) {
StopLoss = StopLoss;
TakeProfit = TakeProfit;
}
return (0);
}
int deinit() {
return (0);
}
int start() {
if (g_bars_92 < Bars && TOOC() == 0 && g_bars_92 != 0 && gi_96) OrderSend(Symbol(), OP_BUY, Lots, Ask, 0, Bid - StopLoss * Point, Ask + TakeProfit * Point, 0, 0, 0, Red);
g_bars_92 = Bars;
if (TOOC() == 1) gi_96 = FALSE;
Comment("Error: ", GetLastError());
return (0);
}
int TOOC() {
int li_ret_0;
for (int l_pos_4 = 0; l_pos_4 < OrdersTotal(); l_pos_4++) {
if (OrderSelect(l_pos_4, SELECT_BY_POS, MODE_TRADES))
if (OrderSymbol() == Symbol()) li_ret_0++;
}
return (li_ret_0);}
}