Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

NonLagMA with ATR Bands and Control Panel - MetaTrader 5 Script - MT4/MT5 Resources

author EAcpu | 2 reads | 0 comments |

NonLagMA with ATR Bands and Control Panel - indicator for MetaTrader 5

NonLagMA with ATR Bands and Control Panel - indicator for MetaTrader 5

NonLagMA with ATR Bands and Control Panel - indicator for MetaTrader 5

The control dashboard has the functionality shown in the figure:

NonLagMA with ATR Bands and Control Panel - indicator for MetaTrader 5

One option for defining indicator buffers (and plotting) is to separate data from code and provide the data of each buffer to a single code block. In addition to the data array, an enumeration is defined to access the array via a human-readable index and point to the correct array entry.

NonLagMA with ATR Bands and Control Panel - indicator for MetaTrader 5

This data is then fed by a for loop, which accesses the array and feeds the data to the index setting functions - each function only needs to be entered once:

Likewise, the structure is used to define an array of buffers that can be accessed throughout the program using the same "IndicatorBufferIdx" enumeration value:

structure {
double m_indi_buff[];
} indi_array[k_end_indi_idx]; // Create an indicator buffer according to the defined number of indicator buffers

Like this: indi_array[k_ATR_up_idx].m_indi_buff[shift];

Define and use two classes:

OnCalculate consists of 6 function calls, each of which returns false if processing fails and terminates the OnCalcualte function by returning the number of previously successfully processed bars (the value in the static integer last_prev_calculated):


Attachment download

📎 nonlagma_lb.mq5 (90.63 KB)

Source: MQL5 #23491

NonLagMA with ATR Bands and Control Panel - Important points before using the MetaTrader 5 script

This page has been supplemented with structured instructions, focusing on the purpose of trading scripts, MT4/MT5 platform compatibility, testing procedures and risk control. Before downloading or deploying, it is recommended to first determine whether it is consistent with your own variety, cycle and account environment.

Suitable for who to use

  • Users who want to quickly screen trading scripts and are willing to do simulation verification first.
  • People who need to compare MT4/MT5 EAs, indicators, scripts or source code projects.
  • Traders who wish to record backtests, parameters and risk boundaries before placing a trade.

Testing and risk control suggestions

  • First verify the default parameters in the strategy tester or demo account, and then adjust the symbol, period, spread and trading period one by one.
  • Scalping, grid, martin, and high-frequency strategies should focus on observing maximum drawdowns, consecutive losses, slippage, and trading frequency.
  • It is not recommended to run any document directly on the real disk. At least observe the simulated disk performance for 2-4 weeks first.

FAQ

Can MT4 and MT5 be used interchangeably?
Usually cannot be used directly. EX4/MQ4 corresponds to MT4, EX5/MQ5 corresponds to MT5, and the source code needs to be compiled in the corresponding MetaEditor.

Is this resource guaranteed to be profitable?
cannot. EAs, indicators and scripts can only be used as trading tools, and the results depend on parameters, market environment, spreads, slippage and risk control.

What else can I continue to watch?
Forex EA download , foreign exchange indicator download , EA evaluation , MQL5 CodeBase .

English Search Notes

This page is also optimized for English search intent around NonLagMA - MetaTrader 5 script with ATR bands and control panel . Related search terms include: trading script, MT4 script, MT5 script. Test any Forex EA, Expert Advisor, MT4/MT5 indicator, script or MQL source code with historical data and a demo account before live trading.

Verification code Refresh