Forum

Using new operator?

The code generated by EA generator MT5 i ncludes definitions of object pointer for example : CExpertSignal *signal = new CExpertSignal; Why not use this method? CExpertSignal signal; What is the reason for using the new operator

MQL5 pointer vs C++ pointer

What is the difference between MQL5 pointer and C++ pointer

Why CObject?

Standard Library Why in the MQL5 standard library, class CAccountInfo or CPositionInfo, derives from class CObject? What is the role of the CObject class

Change order number

Is it possible the order number(ticket number) to be changed by the broker or by metatrader

Do not change the order number!

In metatrader when price level touched a pending order and a position opened, the order number is not change. Why? Will the opened position be recorded on the previous pending order

The effect of disconnection on output of time series functions

My EA is sensitive to the information of some recent candlesticks of M1 timeframe. If the internet connection stops for a few minutes, how do I make sure that the functions used (iTime, CopyClose ,...) give the correct values? How can I know that the output values of these functions are correct

Static variable or global variable?

Which is better and safer? use static variable in OnTick () function or global variable

stochastic oscillator source code (bug)

In stochastic oscillator code at (\MQL4\Indicators\Stochastic.mq4) on line number = 90,117,141 this code exists: pos=prev_calculated- 2 ; My question : similar to other indicator, why is not this? pos=prev_calculated-1; I chose the second method, but there was no change in the results

Question about stochastic oscillator source code

In stochastic oscillator code at (\MQL4\Indicators\Stochastic.mq4) on line number = 90,117,141 this code exists: pos=prev_calculated- 2 ; My question : similar to other indicator, why is not this? pos=prev_calculated-1; I chose the second method, but there was no change in the results