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

Incorrectly Entering Trades using Strategy Builder

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

    Incorrectly Entering Trades using Strategy Builder

    Hey All-

    I am trying to figure out what is going wrong when I am using Strategy Builder to automate my trading.

    Simple starting strategy:
    • Go long on the candle following an inside candlestick IF the high breaks the high of the inside candlestick by one tick.
      • See the first attached photo for a trade that I want the automation to take.
        • As you can see the buy was executed at 4311.75 which is one tick higher than the previous red inside bar's high of 4311.5
    The issue I am having is shown in the second photo:
    • The trade is made on a bar following an inside candle at 4378.
    • However, the candle the trade was made on never ticks above the inside green candle's high. (Trade shouldn't have been made)
    • The 4378 entry price is the high of that red candle, but I don't want it to execute that trade since it didn't tick above the previous green inside bar's high.

    Another question I have is how would the strategy builder know that 4378 is the candles high if this were to happen in real time? Looking back it is easy to see that 4378 is the high of that candle but in real time you wouldn't know that.

    I will attach a copy of the Conditions and Actions I have done thus far.

    Thanks in advance for the help,

    Nick
    Attached Files

    #2
    Hello Nick,

    If Calculate is OnBarClose, note that the order would be submitted at the open of the new bar after the submission bar closes.

    A limit order will fill at the specified price or better. Meaning for a buy order, if the market price is lower, it would fill at market price as market price is a better price.

    In the screenshot, the order is at the high of the bar, which would indicate the limit price of the order was at or above this price and the order may have filled at a better price.

    With limit orders, if they are not filled these will automatically be cancelled if not re-submitted on the next bar. If you are seeing missing orders, enable TraceOrders and check the output in the NinjaScript Output window for cancelled order messages.

    An example of keeping an order alive by saving the order price to a variable and re-submitting the order.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by ETFVoyageur, Today, 06:11 AM
    2 responses
    16 views
    0 likes
    Last Post ETFVoyageur  
    Started by Belfortbucks, Today, 08:21 AM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by ETFVoyageur, Today, 02:15 AM
    2 responses
    19 views
    0 likes
    Last Post ETFVoyageur  
    Started by EliIsrael, Today, 08:15 AM
    1 response
    8 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by cshox, Yesterday, 11:11 AM
    4 responses
    23 views
    0 likes
    Last Post cshox
    by cshox
     
    Working...
    X