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 judysamnt7, 03-13-2023, 09:11 AM
    4 responses
    57 views
    0 likes
    Last Post DynamicTest  
    Started by ScottWalsh, Today, 06:52 PM
    4 responses
    36 views
    0 likes
    Last Post ScottWalsh  
    Started by olisav57, Today, 07:39 PM
    0 responses
    7 views
    0 likes
    Last Post olisav57  
    Started by trilliantrader, Today, 03:01 PM
    2 responses
    19 views
    0 likes
    Last Post helpwanted  
    Started by cre8able, Today, 07:24 PM
    0 responses
    9 views
    0 likes
    Last Post cre8able  
    Working...
    X