Click or drag to resize

MZpackCustomStrategy1 Class

Demonstrates how to use StrategyBigTradeIndicator class and StrategyVolumeProfileIndicator class in Custom mode, including backtesting in Strategy Analyzer. The logic of the strategy is 'On bar close'. ATTENTION: Indicator settings in UI are used only for displaying markers on the chart. Strategy uses its own internal settings for filters and logic.
Strategy logic description.
1. Calculate bar range on bar close;
2. If range of closed bar is greater or equal to 'Start bar range' start to build developing profile from this bar;
3. If range of closed bar is less or equal to 'Min bar range' or greater that 'Max bar range', cancel building of profile;
3.1 Calculate delta of aggressive big trades inside profile;
3.2 Enter position: enter SHORT if Delta is negative and bigTradeDelta is positive; enter LONG if Delta is positive and bigTradeDelta is negative;
See installation folder for the source code.
Inheritance Hierarchy
SystemObject
  NinjaScript
    NinjaScriptBase
      StrategyBase
        StrategyRenderBase
          MZpack.NT8.AlgoMZpackStrategyBase
            NinjaTrader.NinjaScript.Strategies.MZpackAPISamplesMZpackCustomStrategy1

Namespace:  NinjaTrader.NinjaScript.Strategies.MZpackAPISamples
Assembly:  MZpack.NT8.Pro (in MZpack.NT8.Pro.dll) Version: 3.18.1.0 (3.18.1.0)
Syntax
C#
public class MZpackCustomStrategy1 : MZpackStrategyBase

The MZpackCustomStrategy1 type exposes the following members.

Constructors
  NameDescription
Public methodMZpackCustomStrategy1
Initializes a new instance of the MZpackCustomStrategy1 class
Top
Properties
  NameDescription
Public propertyStrategy_AggressionFilter
BigTrade Indicator attribute
Public propertyStrategy_KeepProfileMaxBarRange
Maximal bar range to keep a profile
Public propertyStrategy_KeepProfileMinBarRange
Minimal bar range to keep a profile
Public propertyStrategy_StackedProfileType
Minimal bar range to create a profile
Public propertyStrategy_StartProfileMinBarRange
Minimal bar range to create a profile
Public propertyStrategy_StopLossTicks
Public propertyStrategy_TakeProfitTicks
Public propertyStrategy_TradeVolume
BigTrade Indicator attribute
Top
Methods
See Also