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 ezekilany, Today, 01:10 AM
    0 responses
    3 views
    0 likes
    Last Post ezekilany  
    Started by usjavaburn, Today, 12:59 AM
    0 responses
    3 views
    0 likes
    Last Post usjavaburn  
    Started by heatherjmarshalls, Today, 12:56 AM
    0 responses
    2 views
    0 likes
    Last Post heatherjmarshalls  
    Started by Nicholewatkinsi, Yesterday, 10:53 PM
    0 responses
    6 views
    0 likes
    Last Post Nicholewatkinsi  
    Started by dward123, 01-02-2024, 09:59 PM
    4 responses
    176 views
    0 likes
    Last Post Lancer
    by Lancer
     
    Working...
    X