I will write an advisor free of charge - page 163

 
137 Matrix, didn't understand anything about how you can turn off auto-trading with this.
137 Matrix
137 Matrix
  • www.mql5.com
Профиль трейдера
 
gorbenko85 # I do not understand how this can be used to disable auto-trading.

You have installed EAs on the charts and you set this one on a separate (different) chart

In the settings set the amount of loss, when this amount is reached - press Ctrl+E (allows or disables algotrading)

 
137 Matrix #:

You have installed EAs on the charts and you set this one on a separate (different) chart

You set the amount of loss when the amount is reached and press Ctrl+E (allows or disables algorithmic trading)

I do not know how to use this function and I do not know how to use it. But I couldn't get the damn thing to work.

 
gorbenko85 #:

Thanks for the answer. But I couldn't get the damn thing to work.

Try this code - when you install this EA on the chart - check all the boxes in the settings.

Screenshot 2022-02-07 105956

When it reaches minus (- 1rub) the function should work and this EA will be deleted and the signal will sound.

input double InpSLossAll = 1000000; // ALL Stop Loss --> (In currency the amount)
Files:
Stop_Avto.mq4  3 kb
 
gorbenko85 #:

Thanks for the answer. But I can't get the damn thing to work.

Do you have a WinUser32.mqh file in this Include folder ???

Screenshot 2022-02-07 160402

 
137 Matrix, thank you very much.Stop Avto.mq4 works. The only thing I do not quite understand is when it works and when it does not. I have tested it but still do not understand whether to enable or disable autotrading. But I have understood one thing for sure: if I first install, then disable autotrading and enable it manually, it will work 100%. Thank you.
 
gorbenko85 #:

137 Matrix, thank you very much. Stop Avto.mq4 works. The only thing I do not quite understand is when it triggers and when it does not. I have tested it but still do not understand whether I should first set it and then enable auto-trading or vice versa. But I have understood one thing: if I first set it, then disable it and enable autotrading manually, it will work 100%. Thank you.

It is triggered when you set the loss amount. It can either switch it on or off. If you manually press Ctrl+E, it turns auto-trading on, if you press it again, it turns it off.

the same principle is true for Expert Advisors.

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

If you set this parameter and auto-trading is disabled, the Expert Advisor will enable auto-trading after a loss occurs.

If auto-trading has been enabled, it will deactivate auto-trading.

 

Please write a simple EA:

MT4 EA works on current TF and current symbol.

If it is realistic: Please make more modes in settings ( Manual and Auto )

- Manual: At entry - give audible warning and Alet which currency. The Expert Advisor does not open deals by itself

- Auto mode: By itself opens position and puts a stop-stop.

Files:
2.png  49 kb
 

if it is possible to write an Expert Advisor that works on the crossover of 2 averages but takes a signal to open a position from 3-4 timeframes

used_timeframes

extern int Frame1           = PERIOD_M30;
extern int Frame2           = PERIOD_M5;
extern int Frame3           = PERIOD_M1;

it is possible without everything else, without stops, without trailing stops etc., only the data of the moving average

entering the market from a smaller PERIOD_M1

extern string Ind         = "=== Сигналы индикаторов ==="; //=====================
extern int    BarSignal   = 0;     //Бар сигнала (=0 текущий)
extern string MAfast      = "=== Быстрый MA ==="; //Индикатор ==>>
extern int    FastPeriod  = 110;    //Период
extern int    FastShift   = 7;     //Сдвиг
extern ENUM_MA_METHOD FastMethod    = MODE_EMA;    //Метод
extern ENUM_APPLIED_PRICE FastPrice = PRICE_CLOSE; //Цена


extern string MAslow      = "=== Медленный MA ==="; //Индикатор ==>>
extern int SlowPeriod     = 250;    //Период
extern int SlowShift      = 7;     //Сдвиг
extern ENUM_MA_METHOD SlowMethod    = MODE_EMA;    //Метод
extern ENUM_APPLIED_PRICE SlowPrice = PRICE_CLOSE; //Цена


 

can you write an indicator for free ?