Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Session, StopLoss, Profit target

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

    Session, StopLoss, Profit target

    Hi,
    I have two questions:
    1. What is a session for the S&P e-mini?
    2. I'm trying to debug a strategy and object Position hold my current position. Which object holds my stoploss and profit target?

    Regards,
    Baruch

    #2
    1. Regular session is 8:30 AM to 3:15 PM Central US time
    2. What do you mean by object that holds stop/target?
    RayNinjaTrader Customer Service

    Comment


      #3
      Hi,
      Thanks.
      So if in back testing if I ask Bars.SessionBreak I will get "True" each day at 8:30?
      My second question was - How to query StopLoss price after I set it with SetStopLoss().

      Baruch

      Comment


        #4
        Hi Baruch, I would suggest using BarsSinceSession or FirstBarOfSession -





        You can use the IOrder object for order tracking - http://www.ninjatrader-support.com/H...V6/IOrder.html
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Thanks a lot.
          I have another question regarding sessions and I need to explain it.
          I live in Israel and we change to summer saving time on different dates as in US. So most of the time ES session (8:30-16:15 ET) will be from 16:30 to 23:15 local time. From March 9 till a week ago it was from 15:30 to 22:15 local time.
          I want to write a strategy that will run each day from 5 hours before Pit session starts and 15 minutes before Pit session ends.
          For the end time I believe I can use ExitOnCloseSeconds.
          Is it so and also will it be correct on short trading days like November 28 Pit session (8:30-12:15 ET) and December 25 with only electronic trading.
          How to know in advance when the session starts?

          Regards,
          Baruch

          Comment


            #6
            Hi Baruch, those methods just pick up the session begin / end settings you have set in the chart properties (just doubleclick on the chart). So you can either manually adjust those as needed, or add custom time filter rules for your strategy reflecting the short trading days as you mentioned - http://www.ninjatrader-support2.com/...ead.php?t=3226
            BertrandNinjaTrader Customer Service

            Comment


              #7
              Thanks Bernard,
              This is not what I need. I need sessions time for back testing.
              You see I come from eSignal platform and there they have continues contracts and Pit session time frame (ES #F=2). I'm trying to convert my strategy from eSignal (efs) to Ninja Script and have difficulties.
              I want to understand - if I leave the from time 00:00 and end time 00:00 I can't know anything about session? Not SessionBreak(), FirstBarOfSession(), ExitOnCloseSeconds(). None of them?

              Baruch

              Comment


                #8
                Baruch, those are all linked to the session settings you have on your chart properties. So for your needs I would implement the time filter rules as outlined in the reference sample I posted.

                BertrandNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by proptrade13, Today, 11:06 AM
                1 response
                5 views
                0 likes
                Last Post NinjaTrader_Clayton  
                Started by quantismo, 04-17-2024, 05:13 PM
                4 responses
                32 views
                0 likes
                Last Post quantismo  
                Started by love2code2trade, 04-17-2024, 01:45 PM
                4 responses
                32 views
                0 likes
                Last Post love2code2trade  
                Started by cls71, Today, 04:45 AM
                2 responses
                10 views
                0 likes
                Last Post eDanny
                by eDanny
                 
                Started by kulwinder73, Today, 10:31 AM
                1 response
                10 views
                0 likes
                Last Post NinjaTrader_Erick  
                Working...
                X