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 yeikson89, Today, 02:53 PM
        2 responses
        10 views
        0 likes
        Last Post yeikson89  
        Started by sdauteuil, Today, 01:06 PM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_Jim  
        Started by trumpy, 03-09-2017, 02:11 PM
        30 responses
        3,224 views
        0 likes
        Last Post foxthorn  
        Started by shani77, Today, 09:58 AM
        1 response
        23 views
        0 likes
        Last Post NinjaTrader_Eleanore  
        Started by cjanau, Yesterday, 11:07 AM
        1 response
        31 views
        0 likes
        Last Post NinjaTrader_ThomasC  
        Working...
        X