Example #1
0
        //Retreive data from config to initialise the rule
        public override void Init()
        {
            SymbolCode = GetSymbolCode();

            //Get Rule Config params
            ExecuteOnlyOnce             = GetRuleConfigBoolParam(RuleConfiguration.EXECUTEONLYONCE);
            NumberOfOrders              = GetRuleConfigIntegerParam(RuleConfiguration.NUMBEROFORDERS);
            EntryPipsFromTradeOpenPrice = TradeUtils.CalcPipsForBroker(GetRuleConfigDoubleParam(RuleConfiguration.ENTRYPIPSFROMTRADEOPENPRICE));
            TakeProfitPips              = TradeUtils.CalcPipsForBroker(GetRuleConfigDoubleParam(RuleConfiguration.TAKEPROFIPIPS));

            //Listen for state updates for this strategy
            StateManager.ListenForStateUpdates();
        }