Questions from a "dummy" - page 18

 
Cron:

Thanks for the option, but sometimes you need to cover a position before the news comes out and the stopgap can be stretched to unacceptable limits, say 50 pips on a 4 marker.

This is why stop pulling cannot be a universal solution, unfortunately for me :(

Trade not orders but position volumes, a market close with a check will give the necessary guarantees.

If you close 1000 times, you will get a good close, on 1001 you will get a residual position which you will have to close with a new order (as a result of the check). At most, you will lose an extra spread for 1001 times. Closing out of the market will not have any stops.

Документация по MQL5: Стандартные константы, перечисления и структуры / Торговые константы / Свойства позиций
Документация по MQL5: Стандартные константы, перечисления и структуры / Торговые константы / Свойства позиций
  • www.mql5.com
Стандартные константы, перечисления и структуры / Торговые константы / Свойства позиций - Документация по MQL5
 
Urain:

Do not trade orders but position volumes, a market close with a check will provide the necessary guarantee.

At 1000 you will close normally and at 1001 you will get a residual position that you will have to close with a secondary order (as a result of the check). At most, you will lose an extra spread for 1001 times. Closing out of the market will not have any stops.

And with a bit of luck, you may not lose (and may even win an extra spread)...
 
Interesting:
And that's as luck would have it, you may not lose (or even win an extra spread)...
Yes, you might get a pipsqueak, but these are statistically insignificant cases.
 

Many thanks to all!

After much deliberation I have settled on the option of zeroing SL/TP and then closing the position 100%.

 
alexey_petrov:
Uncheck the "Auto update" item in the context menu of Tools -> Calendar tab + There is also a command "Delete all events" to delete news that are already on the chart.

Shot can't find one, where in mt5 to poke?


My question is, how can I check the "Allow automatic trading" option in mql5? Is it possible in principle? What function should I use?

 
AUser:

Shot can't find one where to poke it in mt5?

 

AUser:

Question, how to write a check for "allow auto-trading" in mql5? Is it possible in principle? What function should I use?

Have you readdocumentation? They say it helps...

There is a lot of interesting stuff here, particularly in your question.

Concerning the essence of the question - there are two great identifiers

ENUM_TERMINAL_INFO_INTEGER - TerminalInfoInteger()

TERMINAL_TRADE_ALLOWED

Permission to trade

bool


2. ENUM_MQL5_INFO_INTEGER- MQL5InfoInteger()

MQL5_TRADE_ALLOWED

Permission totrade for the current program running

bool

 
AUser:

Question, how to write a check for "allow auto-trading" in mql5? Is it possible in principle? What function should I use?

Look at enumeration ENUM_ACCOUNT_INFO_INTEGER
 
Yedelkin:

Look at ENUM_ACCOUNT_INFO_INTEGER enumeration

Right, forgot all about that - auto-trading can be disabled on the server for a specific account type (and can be for an individual account).
 

All in substance, thank you))


p.s. And dummies are dummies because they don't read the reference))