Questions from Beginners MQL5 MT5 MetaTrader 5 - page 972

 
xxz:

here's how it works...

MM is a fixed lot or percentage option...

Genius!!!

 
xxz:

here's how it works...

MM - is it a fixed lot or percentage option...

Still nothing changes in the tester, can _Lots be removed altogether?

 
Sprut112:

Still nothing changes in the tester, should _Lots be removed altogether?

now...

 
Sprut112:

Still nothing changes in the tester, should _Lots be removed altogether?

like this...

Files:
Experiment.mq5  40 kb
 

The ACCOUNT_FREEMARGIN function from this code is no longer highlighted

https://www.mql5.com/ru/code/2142

The documentation doesn't google it either.

Is this correct?

//AccountInfoDouble(ACCOUNT_FREEMARGIN);

AccountInfoDouble(ACCOUNT_MARGIN_FREE);

Maximum Percentage of Equity Risk
Maximum Percentage of Equity Risk
  • www.mql5.com
Change Chart and Timeframe Модифицированные скрипты для быстрого изменения графиков и таймфреймов на всех графиках при помощи горячих клавиш. Apply Template Простой скрипт для применения шаблона и/или таймфрейма ко всем открытым графикам. Long position Простой скрипт...
 
ilvic:

The ACCOUNT_FREEMARGIN function from this code is no longer highlighted

https://www.mql5.com/ru/code/2142

The documentation doesn't google it either.

Is this correct?

//AccountInfoDouble(ACCOUNT_FREEMARGIN);

AccountInfoDouble(ACCOUNT_MARGIN_FREE);

yes

 
xxz:

like this...

1% is 0,01?
Reads all right, but says Invalid volume
 
xxz:

You won't come up with a particularly brilliant idea, the difference is in the direction of ticks, in real trading on ticks the candle may open, bottom, top, close, and if the big candle is at the bottom you can buy and get a profit by the close, in simulation the candle forms an opening, top, bottom, close, let's say the opening and top coincide with the bottom and close too, then on such a candle you can buy, but not get profit, and if the market went down, then here you have a hanging loss order ...

... hence the divergence...

This is why the differences are different... I don't want to invent anything, I just want to use a ready-made solution. My task is not to think up something brilliant; I just want to bring the results of quick testing closer, if not to real ticks, then at least to ticks.

I am not dealing with ticks, my TP is 500 pips minimum. It seems the sensitivity to ticks should not be too high but it is still significant. I think the sensitivity to ticks should be low, but it is still significant. Besides, it may show better results on ticks than on OHLC, but at this stage I do not need beauty but similarity of testing results, fast with accurate.

I thought there's a ready-made method, otherwise what's the point of different testing modes if they are not simulated accurately by software.

Anyway, thanks for the tips)

 
Is it possible to use this option to calculate the lot as a percentage, replacing MarketInfo of course?
OP_LOTS = (((AccountBalance() * _LosPercent) / 100) / MarketInfo(Symbol(), MODE_TICKVALUE)) / (pp);
It is convenient because it takes into account the symbol on which it is calculated, because eurusd lot and eurnzd lot are two big differences. i wanted to know how to write it for mt5 and if it is possible
 
Comments not related to this topic have been moved to "Questions from MQL4 MT4 MetaTrader 4 beginners".