Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Controlparameters

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

    Controlparameters

    Hi guys

    I want to use my strategy on the s&p future market overnight but not overweekend.
    How should I fill up the controlparameters in this case?

    Thx in advance,

    Theo.

    #2
    Hello Theo,

    The session template you select determines during what times the strategy will run. So you will need to select a session template that excludes the weekend.

    By default, the ES is setup for the 'CME US Index Futures ETH' session template which includes Sunday. If you like to exclude Sunday, you can adjust the session template in the Session Manager. More information can be found at the link below.


    If you run strategies in charts, you select the session template in the Data Series menu of the chart.
    Last edited by NinjaTrader_Jason; 10-25-2012, 03:44 AM.
    JasonNinjaTrader Customer Service

    Comment


      #3
      Hi Jason.

      Thx. That's clear, but how do I need in this case to setup the controlparameters in the strategy itself especially the tradebegintime, tradeendime and friday endtime?

      T

      Comment


        #4
        Hello theodorus,
        Thanks for the clarification and i am replying for Jason.

        You can do it in 2 ways.

        You ca create a custom session template with only one session time defined (From Monday - Friday) and set Exit on close to true from the strategy parameters box.


        However if your strategy strategy uses session templates (BarsSinceSession codes etc then it might not work).

        Alternatively you can further custom code your strategy and use the DayOfWeek to determine if it is Friday or not to exit your positions. A sample code will be like
        Code:
        if (Bars.LastBarOfSession && Time[0].DayOfWeek == DayOfWeek.Friday)
        {
          //do something	
        }
        Please refer to this sample code which further shed light in this regard.
        JoydeepNinjaTrader Customer Service

        Comment


          #5
          Hi.

          I've changed the template by clicking data series in the chart into CME US Index Futures ETH.
          When I click strategies in the chart and click the strategy I use, do I need to modify the tradebegintime, endtime etc.? And what timezone do I use in that case?

          Thx in advance

          Comment


            #6
            Hello theodorus,
            You need to create a new session template as shown in the attached screenshot.

            Please do set Exit on close to true in the strategy parameters dialog.

            However please do note, if your strategy uses codes like FirstBarOfSession etc then this will not work.
            Attached Files
            JoydeepNinjaTrader Customer Service

            Comment


              #7
              Hi.

              I think there is a misunderstanding about this issue.
              What I mean is do I have to modify something in the attached screenshot?

              Thx in advance.

              Theo.
              Attached Files

              Comment


                #8
                Hello Theo,
                Thanks for the clarification.

                If you are running a 3rd party NinjaScript code then please further clarify regarding the workings of the NinjaScript code with him.

                You may have to further custom code the strategy to suit your requirements.
                JoydeepNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Harry, 05-02-2018, 01:54 PM
                10 responses
                3,203 views
                0 likes
                Last Post tharton3  
                Started by cre8able, Yesterday, 01:16 PM
                3 responses
                11 views
                0 likes
                Last Post cre8able  
                Started by ChartTourist, Today, 08:22 AM
                0 responses
                6 views
                0 likes
                Last Post ChartTourist  
                Started by LiamTwine, Today, 08:10 AM
                0 responses
                2 views
                0 likes
                Last Post LiamTwine  
                Started by Balage0922, Today, 07:38 AM
                0 responses
                5 views
                0 likes
                Last Post Balage0922  
                Working...
                X