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 Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    670 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    379 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    111 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    575 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    582 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X