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

Defining candlesticks in Strategy builder + Inbuilt candlestick indicator

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

    Defining candlesticks in Strategy builder + Inbuilt candlestick indicator

    Hello, I would like to ask two questions:

    1. Is it possible to define candlesticks in strategy builder with ratios of body versus shadows?
    For example Hammer candlestick -has short body in the upper part and long lower shadow, so I would like to define it:

    (Close-Open)<((High-Low)*0,25) aka body of the candle is less than 25% of range between high and low.
    (Open-Low)> ((High-Low)*0,6) aka the candle has long lower shadow which takes 60% of the range between high and low.

    I was not able to find way how to set it up in the builder. Only thing I can do is chose Open<Close, Open>Low,Close <High and so on. But this approach dont let me flexibily adjust the variabilities between the candle parameters aswould the first approach do.

    I cannot code, so I cannot do it myself in C.

    2.I tried to test the inbuilt Candle indicator in NT, but I was not able to chose the right variable on the Conditions and Actions page to trigger the trade, when the candlestick is detected. On the left side input, I chose Candlestick pattern,but on the right side, what variable should I chose to trigger the trade? I tried price is greater or equal than the indicator, than indicator and value TRUE....
    In the strategy analyzer, the candles are registered on the chart, but no trade triggers after it appears. What corresponding option in the menu should I pick to trigger the trade after the analyzer confirms the candlestick?



    Thank you very much, for you help

    #2
    Hello ExNihilon,

    Thank you for your note.

    You would not be able to take the difference between the open/close and multiple it by a factor using the builder, this would require working outside the builder. If you’d like I can provide information on learning NinjaScript or I can have someone reach out with a list of third parties that would be interested in writing this for you.

    For a candlestick pattern you would check that the output of the indicator is equal to 0. I have attached a sample strategy written with the builder which will take a short position with a stop and profit target when an bear engulfing formation is formed.


    To Import a NinjaScript into NinjaTrader 8 do the following:
    From the Control Center window select Tools -> Import-> NinjaScript...
    Find the file location.

    Please let us know if you need further assistance.

    Attached Files
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_AlanP View Post
      Hello ExNihilon,

      Thank you for your note.

      You would not be able to take the difference between the open/close and multiple it by a factor using the builder, this would require working outside the builder. If you’d like I can provide information on learning NinjaScript or I can have someone reach out with a list of third parties that would be interested in writing this for you.

      For a candlestick pattern you would check that the output of the indicator is equal to 0. I have attached a sample strategy written with the builder which will take a short position with a stop and profit target when an bear engulfing formation is formed.


      To Import a NinjaScript into NinjaTrader 8 do the following:
      From the Control Center window select Tools -> Import-> NinjaScript...
      Find the file location.

      Please let us know if you need further assistance.
      Hi, Alan,

      thank you very much for your answer and for the strategy attachment you sent me. It worked as you described it. Now it works for me too. So my problem is solved and once again, thank you

      Comment


        #4
        Originally posted by NinjaTrader_AlanP View Post
        Hello ExNihilon,

        Thank you for your note.

        You would not be able to take the difference between the open/close and multiple it by a factor using the builder, this would require working outside the builder. If you’d like I can provide information on learning NinjaScript or I can have someone reach out with a list of third parties that would be interested in writing this for you.

        For a candlestick pattern you would check that the output of the indicator is equal to 0. I have attached a sample strategy written with the builder which will take a short position with a stop and profit target when an bear engulfing formation is formed.


        To Import a NinjaScript into NinjaTrader 8 do the following:
        From the Control Center window select Tools -> Import-> NinjaScript...
        Find the file location.

        Please let us know if you need further assistance.
        Hi I was wondering what this determines to go short? In market playback, I see it going short, but I don't see a Bearish Engulfing?

        Comment


          #5
          My guess: The prior red engulfing candle would have triggered the trade. (4170.00 appears to match the close of the red candle).
          (you don't know for sure what pattern the red candle has until it closes), so the trade that was triggered by close of the red candle would start on the next candle.

          Comment


            #6
            Hello MatthewLesko,

            I would suggest adding the same indicator to the chart with the same settings, or to edit the strategy condition that uses the CandleStickPatterns indicator and select Plot On Chart to visualize.

            You can then see where the indicator plots, and where the strategy enters. The execution marker occurs on the next bar because the order was submitted when the bar closed and fills with the data from the next bar, which is also in line with tradecombine's comments.

            We look forward to assisting.

            Attached Files
            JimNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by cre8able, Today, 01:16 PM
            2 responses
            9 views
            0 likes
            Last Post cre8able  
            Started by chbruno, 04-24-2024, 04:10 PM
            3 responses
            48 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by samish18, Today, 01:01 PM
            1 response
            7 views
            0 likes
            Last Post NinjaTrader_LuisH  
            Started by WHICKED, Today, 12:56 PM
            1 response
            9 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by WHICKED, Today, 12:45 PM
            1 response
            11 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Working...
            X