Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Builder buy when should not

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

    Builder buy when should not

    Hi, in this builder i check the last 2 bard (renko), if they are all green (close > open) buy, but there is an error:

    https://ibb.co/k7DyO5
    https://ibb.co/bwXmAk

    #2
    Hello lorenzoP,

    When you applied the strategy, likely you are running the strategy with Calculate set to OnBarClose, which means that the strategy waits until the bar closes before evaluating if the condition is true or false. Thus, on the bar before the entry on your image, your conditions were true and an order was submitted to buy on the open of the next bar.

    I put together a screen shot explaining this point.

    Please see Calculate section of our helpguide,
    https://ninjatrader.com/support/help...?calculate.htm

    Please let us know if you need further assistance.
    Attached Files
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      Hi, thanks, i treid with calculate on each tick, but there are still error;
      could you please tell me how to do that?

      buy when the last 2 bar are green
      sell when the last 2 bar are red

      (im going to try using a ema with period 3 or 2, if raising buy, if falling sell, could this work?)

      Comment


        #4
        Hello lorenzoP,

        By error are you referring to an actual error message or the strategy not behaving like expected?
        The way your strategy is set up would in real time behave as expected, with calculate set OnEachTick.

        Historical trades are going to be plotted as if calculate was set to OnBarClose. Adding a secondary data series of type tick, and submit orders to that series, should provide more accurate historical trade results by taking away the issue where the trade is not entered on the bar the condition becomes true, but rather on the open of the following bar.

        You should see the following post on intrabar granularity,
        http://ninjatrader.com/support/forum...10&postcount=2

        I look forward to your reply.
        Alan P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by condorhero, Today, 09:28 PM
        0 responses
        5 views
        0 likes
        Last Post condorhero  
        Started by MaraAnkh, Today, 08:44 PM
        0 responses
        6 views
        0 likes
        Last Post MaraAnkh  
        Started by wooofad, Today, 05:38 PM
        0 responses
        7 views
        0 likes
        Last Post wooofad
        by wooofad
         
        Started by caacapital, Today, 10:10 AM
        2 responses
        18 views
        0 likes
        Last Post caacapital  
        Started by DiverG20, Today, 10:23 AM
        0 responses
        23 views
        0 likes
        Last Post DiverG20  
        Working...
        X