Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Break-Even Stop Placed Lower Than Intended in RTY 5 Renko Chart with NinjaScript Bot

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

    Break-Even Stop Placed Lower Than Intended in RTY 5 Renko Chart with NinjaScript Bot

    Hello everyone,

    I hope you're all having a great day. I'm reaching out for assistance regarding an issue I've been facing with my NinjaTrader bot, specifically related to implementing a breakeven stop.

    Following the example provided in the NinjaTrader forum (you can find the link here: Breakeven on Strategy Builder), I attempted to incorporate a breakeven stop into my strategy. However, I've encountered a significant drawback: the stops are consistently placed above the market, resulting in my bot being disabled due to stop rejection errors.

    After carefully reviewing my code and comparing it with the provided example, I still can't identify the reason behind this undesired behavior. I would greatly appreciate any guidance, suggestions, or corrections you can offer to resolve this issue.

    It's worth noting that I'm relatively new to NinjaScript programming, so any insights from the community, especially if you've experienced something similar or have ideas on addressing this specific problem with breakeven stops in NinjaTrader, would be incredibly valuable.

    Thank you all in advance for your time and assistance.

    Best regards,

    Drackstack.

    Attached to this post is a link to download the code for the bot I've been developing.
    Attached Files
    Last edited by drackstack; 12-10-2023, 05:08 PM.

    #2
    I have made a mistake with the subject; It should be 'Issue with Breakeven Stop in NinjaTrader Strategy Builder - Seeking Help from the Community' instead of 'Break-Even Stop Placed Lower Than Intended in RTY 5 Renko Chart with NinjaScript Bot.

    Comment


      #3
      Hello drackstack,

      I took a look at the code however this appears to be a manually coded strategy. With that in mind it would be easier to use a manually coded example that has a breakeven already in its logic. The following sample demonstrates how to do that by watching for the entry order fill and then saving that order to a variable so the average price is known. Then a condition is made for a breakeven.



      If you wanted to keep using the strategy you attached you can use Print statements to verify that your conditions are working as you expect and also what prices are being generated when those conditions are true. That would let you see how the strategy is logically working to know why it may be placing orders on the wrong side of the market.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Today, 05:17 AM
      0 responses
      39 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      124 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      64 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      41 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      46 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X