• 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

Calculate on bar close VS. NOT

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

    Calculate on bar close VS. NOT

    1. Entry Conditions to my strategy are based on calculations made from a BAR's OHLC. If condition is satisfied, I would like to enter on the CLOSE price.

    2. Once I am "in a trade", my EXIT strategy is contingent on the current price (I suppose ASK for a long trade and BID for a short trade) breaching a specified price, calculated from previous bars' data.

    Having said that, is "Calculate on bar close = TRUE" the correct choice? Will my EXIT criteria; (If Current "Ask" <= calculated price; then SELL at market or If Current "Bid" >= calculated price; then BUY to cover at market) adequately address any intrabar price if hit? Or does COBC must equal FALSE?

    #2
    COBC must equal false and this must be in real-time for you to be able to get any intrabar exit. The closing event of a bar is the same event as the opening of the next bar. You can place trades there.

    if (FirstTickOfBar)
    JoshNinjaTrader Customer Service

    Comment


      #3
      Josh:

      Thank you for your help. If I in fact need COBC=FALSE to properly generate the EXIT commands, what language do I add to the code (or Strategy Wizard) to effect the ENTRY signals based simply on BAR data then?

      I guess a follow-up question for those of us who use Strategy Wizard...if we build conditions based on COBC=TRUE, AND we use the Set Profit Targets and Stop Loss Tabs...does that operate intrabar?

      Comment


        #4
        If you use COBC = true and used Set you will get intrabar exits. That should work. As far as trying to mix end of bar handling with more advanced intrabar handling, this may take more effort in the Strategy Wizard.
        JoshNinjaTrader Customer Service

        Comment


          #5
          This is interesting ! Can you please give us an example logic of how to " mix end of bar handling with more advanced intrabar handling" in NT7?

          Comment


            #6
            Hello gplatis,

            Thank you for your post.

            You can find an example at the following link: http://ninjatrader.com/support/forum...ad.php?t=19387

            Please let me know if you have any questions.
            Patrick H.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by pafhjkayfha, Today, 01:10 AM
            0 responses
            2 views
            0 likes
            Last Post pafhjkayfha  
            Started by BrandonT1292, 06-17-2019, 03:03 PM
            2 responses
            22 views
            0 likes
            Last Post thinarthrill  
            Started by cbentrikin, Yesterday, 07:46 PM
            1 response
            7 views
            0 likes
            Last Post NinjaTrader_Marco  
            Started by dr0832, 01-04-2019, 10:34 AM
            7 responses
            143 views
            0 likes
            Last Post Lancer
            by Lancer
             
            Started by RedDuke, Yesterday, 06:14 PM
            0 responses
            5 views
            0 likes
            Last Post RedDuke
            by RedDuke
             
            Working...
            X