コード例 #1
0
    /// <summary>
    /// Constructor where modules are injected
    /// </summary>
    /// <param name="e"></param>
    /// <param name="p"></param>
    public ExampleTradingAgent(EMACrossExample e, ATRExit atr, FixedFractional ff)
    {
        e.slowperiod = 100;

        ff.FixedPercentage = 200;

        atr.atrperiod  = 15;
        atr.multiplier = 1;
    }
コード例 #2
0
    /// <summary>
    /// Constructor where templates are injected
    /// </summary>
    /// <param name="e"></param>
    /// <param name="p"></param>
    public ExampleTradingAgent(EMACrossExample e, ATRExit atr, FixedFractional ff, Risk_Hedger fs)
    {
        e.slowperiod = 150;
        e.fastperiod = 50;

        fs.arbitrage = 80;

        ff.FixedPercentage = 200;

        atr.atrperiod  = 15;
        atr.multiplier = 1;
    }