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 CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    28 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    27 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-25-2026, 09:53 PM
    0 responses
    31 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 03-25-2026, 09:51 PM
    0 responses
    18 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 03-23-2026, 11:13 AM
    0 responses
    30 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X