Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1170

 
VANDER:

Like this for example.

This is not a fractional spread, but the difference in Ask and Bid prices.

Divide sp2 by SymbolInfoDouble(_Symbol, SYMBOL_TRADE_TICK_SIZE) and get the spread.

 
Isn't the difference between an ask and a bid a spread? Anyway, thanks, I've got it.
 
VANDER:
Isn't the difference between an ask and a bid a spread? Anyway, thanks, I've got it.

Exactly the spread. But in different "supplies"... In pips and in quotes.

 
Hello, could you please tell me about the "Simple Moving Average" indicator? The question is how to make it calculate only the value of the first tick of the bar in its source code? For example, on the daily chart of EUR/USD market opens at 00.00 and at the very first tick of the market the SMA with a period of 10, for example, shows the average price 1.11347. But by 00.15 the price together with the moving average can already fly up or down, and the very first value of SMA 1,11347 will be lost. In general, how to make the SMA freeze in place and show only the first tick of 1.11347 and not move with the market, and recalculate the SMA only with each new candle of the timeframe. What in the original Moving Average needs to be changed? Is it real? Or is it a technology of the next millennium? Help a humanitarian))
 
Александр:
Hello, Could you please tell me more about the "Simple Moving Average" indicator? My question is - how can I make it calculate only the value of the first tick of the bar in its source code? For example, on the daily chart of EUR/USD market opens at 00.00 and at the very first tick of the market the SMA with a period of 10, for example, shows the average price 1.11347. But by 00.15 the price together with the moving average can already fly up or down, and the very first value of SMA 1,11347 will be lost. In general, how to make the SMA freeze in place and show only the first tick of 1.11347 and not move with the market, and recalculate the SMA only with each new candle of the timeframe. What in the source code of Moving Average needs to be changed? Is it real? Or is it a technology of the next millennium? (Please, help me.)
I have to declare a variable with datetame type on global program level (it will store the open time of the bar.
It only remains to compare this variable with the time of the current bar: if they are the same - do nothing, if they are different - calculate the indicator once and rewrite the time in the variable.

Read articles containing the phrase "zero bar recalculation".
 

promise :

1

https://www.metatrader5.com/ru/terminal/help/algotrading/strategy_optimization




and this is how it works:

2



Press stop, put the computer into sleep mode. Wake it up from sleep mode, press start.

 

Of course, broken promises are infuriating, but overall mt5 is a huge opportunity!

Thanks a lot to the developers !!!! :)))

 
Hello all! Tell me about this! I buy an EA, put it in the terminal with default settings and when tested I get a loss on almost all EAs, or a very small profit, which is very different from the author's one!
 
ever07770:
Hello all! Tell me about this! I buy an EA, put it in the terminal with default settings and when tested I get a loss on almost all EAs, or a very small profit, which is very different from the author's one!

Transfer the money to the peace fund.

 
ever07770:
Hello all! Tell me about this! I buy an EA, put it in the terminal with default settings and when tested I get a loss on almost all EAs, or a very small profit, which is very different from the author's one!

Ask such questions in the discussion of the Expert Advisor you bought - the Market has a buyer-only section for discussing problems and suggestions with the author of the product.
In the forum - it is useless to discuss products from the Market and it is forbidden by the rules of the resource.

Reason: