Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT 6.5 Strategy Parameter Question

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

    NT 6.5 Strategy Parameter Question

    Hi,

    I was wondering if it might be possible to vary the defaults shown for a strategy/indicator parameter depending on instrument or timezone.
    I do know that the defaults for a Parameter are defined in the Variables Section on declaration. But is it possible to vary these by timezone or instrument.

    1) by timezone
    Example:
    private int Mar****pen=093000; //new york time

    When the strategy is opened the default Mar****pen is 93000.

    Now if my buddy in California opens my strategy he must change it every time to 63000 because he is 3 hours behind me.
    I really do not want to have to create 2 versions of the ninjascript.
    Is there a way around this?

    2) by Instrument
    if the instrument is the ES emini I would like to start the strategy at 9.30 am
    however if the instrument is 6E i would like to start the strategy at 8.00 am
    may i change the default parameter by checking the instrument that is on the chart?

    3) If either of the above is not possible, to modify the parameters and save the person fro having re-key all the time,.... is it possible to save values to an ascii.txt.file and then read as the defaults parameters.

    Either way i want the user to have control over the timezone parameter value... i do not want to have them have to re enter it every time they open the strategy
    I am just reaching here..Just wondering?
    Last edited by SammyC; 09-17-2010, 01:14 PM.

    #2
    Hello SammyC,

    1) This is not supported but you may find use with C# method ToUniversalTime()
    This converts local time objects to a universal constant - GMT time. You can then set parameters based on a conversion from this.

    2) The instrument is specified at run time so difficult to code for inputs based off this. Any checks for the instrument should take place in OnBarUpdate. You wouldn't have access to the instrument property at the time needed to check. You could hard code the times used to run the strategy, but these values wouldn't be available as inputs.

    3) You can save strategy setting as default in NinjaTrader 7. This is done through Right Click > Save as Default when setting it up. These are saved as xml files in:
    My Documents\NinjaTrader 7\templates\strategy

    Unfortunately the instrument selected is not saved as part of this xml file.
    Ryan M.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Max238, Today, 01:28 AM
    1 response
    22 views
    0 likes
    Last Post CactusMan  
    Started by giulyko00, Yesterday, 12:03 PM
    2 responses
    10 views
    0 likes
    Last Post giulyko00  
    Started by r68cervera, Today, 05:29 AM
    0 responses
    4 views
    0 likes
    Last Post r68cervera  
    Started by geddyisodin, Today, 05:20 AM
    0 responses
    6 views
    0 likes
    Last Post geddyisodin  
    Started by JonesJoker, 04-22-2024, 12:23 PM
    6 responses
    38 views
    0 likes
    Last Post JonesJoker  
    Working...
    X