NNFX Algo Tester Help

Setting up a Custom Line Cross With MA indicator

The Line Cross With MA option allows you to add an external indicator to your algorithm.

You can see examples of Line Cross With MA indicators here: https://nnfxalgotester.com/help/line-cross-with-ma/

How the Line Cross With MA option works:

As you can see in the image below, the Line Cross With MA option can be used to include indicators as C1, C2, Volume, Exit or Continuation. Each function will use the same indicator differently, so:

  • As Main Confirmation (C1) or Continuation Indicator: A BUY signal is created whenever the indicator element crosses over the chosen MA line from below, and a SELL signal is created whenever the indicator element crosses over the MA line from above.

  • As 2nd Confirmation (C2): A BUY signal is accepted when the indicator element is above the MA line. And a SELL signal is accepted when the indicator element is below the MA line.

  • As Volume Indicator: A BUY or SELL signal is accepted when the indicator element is above the MA line (trade zone = volume in the market). The signal is blocked if the indicator element is below the MA line (no-trade zone = market without volume).

  • As Exit Indicator: An Exit SELL signal (ie. to close a short position) is generated when the element created by the indicator crosses above the MA line. And an Exit BUY signal (ie. to close a long position) is generated when the element created by the indicator crosses below the MA line.


Line Cross With MA configuration:

To include a Line Cross With MA indicator, the indicator inputs, the indicator path and name, the buffer representing the line created by the indicator, and the two moving average parameters (MA period and MA method) must be indicated in the "Indicator Parameters" section.

The indicator should be placed in MT4's indicators folder (MQL4\Indicators).

Pro tip: To invert the operating mode, simply place a minus sign before the buffer. For example, change from "1" to "-1".