Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Rearrange Initialize and StartUp with OnStateChange

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Rearrange Initialize and StartUp with OnStateChange

    I am a bit confused about how to deal with the new OnStateChange method with State.SetDefault and State.Configure. In the indicator I am trying to convert I hd a few things in Initialize and OnStartUp methods :

    protected override void Initialize()
    {
    VendorLicense("xxxx");
    this.Name=" xxx";
    CalculateOnBarClose=false;
    Overlay = true;
    gv=new GVManagerClass();

    Add(PeriodType.Day, 1);
    }

    protected override void OnStartUp()
    {
    folder = Path.Combine(folder,"NinjaTrader 7");
    folder = Path.Combine(folder,"bin");
    folder = Path.Combine(folder,"Custom");
    helpfile = Path.Combine(folder, "xxxx.chm");
    helper.instrumentName = Instrument.MasterInstrument.Name+Instrument.Expiry +BarsArray[0].BarsType.PeriodType;
    AddMenuAndItems();
    RegisterInstance();
    GlobalVariables.Subscribe("xxxx",this);
    }

    I am a bit confuse about how to rearrange these methods with the new OnStateChange NT 8 method.

    I need guidance

    Thanks

    #2
    Ok I found the solution of my problem.

    Well defined in the documentation...

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by cre8able, Today, 01:16 PM
    2 responses
    9 views
    0 likes
    Last Post cre8able  
    Started by chbruno, 04-24-2024, 04:10 PM
    3 responses
    48 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by samish18, Today, 01:01 PM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_LuisH  
    Started by WHICKED, Today, 12:56 PM
    1 response
    9 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by WHICKED, Today, 12:45 PM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Working...
    X