• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Trade Entry at close of the bar

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

    Trade Entry at close of the bar

    Hi... I am new to Ninjatrader 8. I have designed a strategy with EnterLong() and EnterShort() for long and short entry. my problem is it is taking entry at the open of the bar and I want it to take entry at the close of the bar. I have set calculate = Calculate.OnBarClose;

    Please help me. Thanks in advance.
    Himanshu Paliwal

    #2
    Hello palihimanshu,

    Thanks for your post and welcome to the NinjaTrader forums.

    Please note that you have posted in the NinjaTrader7 general development forum and have expressed code (calculate = Calculate.OnBarClose) that would be found in NinjaTrader8.

    Can you clarify if you are using NT7 or NT8.

    Can you clarify if you are using NT7, are you coding directly in Ninjascript or are using the Strategy Wizard?

    Can you clarify if you are using NT8, are you coding directly in Ninjascript or are using the Strategy Builder?

    In both cases, when you use CalculateOnbarClose, the strategy code is executed once at the end of each bar. If the code places the EnterShort() or EnterLong(), the market order would be filled on the next bar. You may want to have your strategy draw a marker on the chart when the conditions are true to place the order. You would then be able to see which bar the entry conditions were true followed by the actual entry on the next bar. Using drawing objects is a good visual reference and debugging technique on the chart. (Draw something when the conditions are true).



    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Hello NinjaTrader_PaulH,

      I am using NT8. Your reply was very helpful. Thanks a lot for that.

      Now I have another problem. When I load Stock SBIN in chartWhich is an Indian stock traded on NSE (National Stock Exchange, India), It shows me the data in historical data segment but does show in chart for some particular date like 1 April 2016.

      My question is "Does NT8 has any trading day list of NSE?"

      Does it refer that list to make chart from data? if yes can I edit that list?

      Where can I find that list?

      Thanks in advance.
      Himanshu Paliwal

      Comment


        #4
        Hello palihimanshu,

        Thanks for your reply.

        We will move this thread to the NT8 strategy forum.

        NinjaTrader does not provide historical data for equities. You would need to contact your data feed provider for how much historical data they provide.
        In NinjaTrader when you create a chart, the data series defines how many "days to load" (and there are other options there). Typical default for daily bars would be 365 days.
        I may not be understanding your questions, please feel free to ask again perhaps differently or with a chart example.
        Paul H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by punkiy2111, 01-17-2020, 04:02 PM
        5 responses
        11 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by samir, Today, 01:45 PM
        0 responses
        2 views
        0 likes
        Last Post samir
        by samir
         
        Started by yoweti, Yesterday, 09:59 AM
        2 responses
        15 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by mike09, 01-17-2020, 07:37 PM
        2 responses
        34 views
        0 likes
        Last Post koganam
        by koganam
         
        Started by ChazJ, Today, 11:04 AM
        0 responses
        2 views
        0 likes
        Last Post ChazJ
        by ChazJ
         
        Working...
        X