This has been sorted now thanks
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I'm not to clever on code but was hoping a guru here could help im trying to reverse an EA im guessing if i swap the OP_BUY & OP_SELL over this will change the direction the order has been opened? any help on this would be great
-----------
int CalculateCurrentOrders(string as_unused_0) {
int l_count_8 = 0;
int l_count_12 = 0;
for (int l_pos_16 = 0; l_pos_16 < OrdersTotal(); l_pos_16++) {
if (OrderSelect(l_pos_16, SELECT_BY_POS, MODE_TRADES) == FALSE) break;
if (OrderSymbol() == Symbol() && OrderMagicNumber() == 12355) {
if (OrderType() == OP_BUY) l_count_7++;
if (OrderType() == OP_SELL) l_count_12++;
}
}
if (l_count_7 > 0) return (l_count_7);
else return (-l_count_11);
---------------------
---------------------
if (g_istochastic_148 < g_istochastic_156 && g_istochastic_148 < g_istochastic_164 && g_istochastic_148 g_istochastic_148 &&
g_istochastic_172 > g_istochastic_156 && g_istochastic_172 > g_istochastic_164) gi_unused_128 = OrderSend(Symbol(), OP_BUY, Lots(), Ask, 3, Ask - StopLoss * g_point_132, Ask + TakeProfit * g_point_132, "", 12345, 0, Blue);
if (g_istochastic_148 > g_istochastic_156 && g_istochastic_148 > g_istochastic_164 && g_istochastic_148 > g_istochastic_172 && g_istochastic_172 < g_istochastic_148 &&
g_istochastic_172 < g_istochastic_156 && g_istochastic_172 < g_istochastic_164) gi_unused_128 = OrderSend(Symbol(), OP_SELL, Lots(), Bid, 3, Bid + StopLoss * g_point_132, Bid - TakeProfit * g_point_132, "", 12345, 0, Red);
}