Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 1024
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
Hello!
How can I start e.g. the for function once after switching on the "Auto-trade" button or restarting the terminal?
Hello ladies and gentlemen!
There is a problem, maybe someone can help.
if (ld_76 >= Porog && ld_84 >= Porog && l_iopen > l_ilow && day_sell != Day())
{
ticket_sell = OrderSend(Symbol(), OP_SELLSTOP, Lot, l_ilow - P, 0, l_ilow - P + SL, 0, 0, 0, iTime(Symbol(), PERIOD_D1, 0) + 86400);
ticket_sell_buy = OrderSend(Symbol(), OP_BUYSTOP, Lot, l_ilow + P, 0, 0, 0, 0, 0, iTime(Symbol(), PERIOD_D1, 0) + 86400);
if (ticket_sell == -1)
{
l_error = GetLastError();
Print("error(", l_error, ")");
}
}
In the tester, one order opens, while the second (BUYSTOP) does not open with error 130. As you see, I didn't put a Stop Loss on it. Where is this error coming from? My broker is Alpari.
Hello!
How can I start e.g. the for function once after switching on the "Auto-trade" button or restarting the terminal?
You need to write a for loop in the Init() function. Then it will be executed once at EA initialization. https://docs.mql4.com/ru/runtime/event_fire
OBJPROP_TOOLTIP
Tooltip text. If the property is not specified, the tooltip automatically generated by the terminal is displayed. Tooltip can be disabled by setting its value to "\n" (line translation)
Good afternoon.
A line of code in an indicator:
Error during compilation:
empty controlled statement found News4.mq4 108 42
Please advise how to write it correctly?
Good afternoon.
A line of code in an indicator:
Error during compilation:
empty controlled statement found News4.mq4 108 42
Please advise how to write it correctly?
Have you tried using Period() or _Period?
Tried it, same result in all editions:
empty controlled statement found News4.mq4 108 41
Something else might be wrong here?
Tried it, same result in all editions:
empty controlled statement found News4.mq4 108 41
Can something else be wrong here?