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

How to trigger a Long entry after a correction

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

    How to trigger a Long entry after a correction

    Regarding using STRATEGY BUILDER (I don't know C# at all), how do I script the condition for triggering a long entry when a bar breaks above any previous bar high after a series of lower high correction bars?

    Let me phrase it again if you don't follow, in the attached picture, I am looking for long since market forms a swing high indicates by the BLUE ARROW, it follows by a series of correction bar (which must have a lower high comparing its previous bar), an entry will trigger once price breaks 1 tick above high of its previous bar, which indicates by the RED ARROW bar in this case.

    Thanks,
    Ric


    #2
    Hello Ric, thanks for writing in.

    This idea would not be so straight forward using the builder. Typically if a script needs to look back at multiple bars and keep track of how many bars have passed since an occurrence of a condition, one would need to manually code the strategy in the NinjaScript editor. In the case of looking for a specific bar pattern, it would be possible by marking the initial condition (the rally swing top) then keeping track of all of the bars after that. One thing all of the subsequent bars have in common is their low is lower than their previous low. This would also need to be tracked by the strategy.

    One example to look at would be the Renko strategy from the NinjaTrader Ecosystem app sharing site:

    https://ninjatraderecosystem.com/use...-strategy-nt8/

    Another script for reference/practice would be the "Candlestick Pattern" indicator for finding certain candlestick patterns on a chart.

    Please let me know if any further questions come up.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Thank you for your reply, Chris.

      That means Strategy builder is not able to program for more sophisticated scenario, or it actually can be done but needs quite a lot of knowledge to accomplish this? I mean When do I use Strategy builder to accomplish a program and when do I consider myself have to learn C# to do a ninjascript myself?

      Comment


        #4
        "Typically if a script needs to look back at multiple bars and keep track of how many bars have passed since an occurrence of a condition,...."

        I don't need to keep tracks how many bars, I just to need a trigger when a bar breaks 1 tick above high of its previous bar, and I don't think this has anything to deal with candlestick pattern that I can think of, so it won't be able to script by STRATEGY BUILDER?

        P.S. I also don't need to monitor lower lows of bar in this case

        Comment


          #5
          Hello grande846, thanks for your reply.

          The condition "when a bar breaks 1 tick above high of its previous bar" would look like this:



          For a handful of examples on the condition builder, see this section of the help guide:
          https://ninjatrader.com/support/help...on_builder.htm

          These can help understand what the strategy builder can and can not do, and also demonstrates the most commonly used techniques like accessing price and indicator data.

          Please let me know if I can assist any further.
          Chris L.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by kaywai, 09-01-2023, 08:44 PM
          5 responses
          601 views
          0 likes
          Last Post NinjaTrader_Jason  
          Started by xiinteractive, 04-09-2024, 08:08 AM
          6 responses
          22 views
          0 likes
          Last Post xiinteractive  
          Started by Pattontje, Yesterday, 02:10 PM
          2 responses
          19 views
          0 likes
          Last Post Pattontje  
          Started by flybuzz, 04-21-2024, 04:07 PM
          17 responses
          230 views
          0 likes
          Last Post TradingLoss  
          Started by agclub, 04-21-2024, 08:57 PM
          3 responses
          17 views
          0 likes
          Last Post TradingLoss  
          Working...
          X