Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy build for custom indicator

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

    Strategy build for custom indicator

    Hi Sir/ Madam,

    I have few question that I need help for strategy build.

    1) How do I add condition for the strategy to check when the bwFractal indicator have red/green box like in the picture attached?

    2) If i want to open order immediately after candle X is started to form and close the open order if the candle X does not hit my open order once its finish forming. How will that be?

    Appreciate the input.

    Attached Files

    #2
    Hello neshnix89,

    From what I can see in the script it has plots which represent those blocks however they are not being set for the current bar at the time of the event. That means the plot would work as a visual only and could not be used directly in the strategy builder for a signal.

    Your second question would require using OnEachTick processing and multiple sets. A first set could check for the initial entry condition and submit an order. Other sets can be used to maintain an order or allow it to expire if their conditions are no longer true. You can see an example of controlling an order here: https://ninjatrader.com/support/foru...rategy-builder

    Comment


      #3
      Hi Jesse,

      Is there any way we could modify the indicator to use the red and green box as a condition for the strategy? Appreciate the help.

      Comment


        #4
        Hello neshnix89,

        Yes you could use that same code in a strategy however the plot is being set 2 bars in the past at the time of the event, that would mean visually it wouldn't line up with what the strategy is doing.

        Comment


          #5
          Hi Jesse,

          I could set the strategy to look at two bars ago correct?

          Comment


            #6
            Hello neshnix89,

            The plot is being set 2 bars ago, if you used that logic in a strategy then by the time the event to set the plot occurred it would be 2 bars later.

            Comment


              #7
              Dear Jesse,

              Yes, my strategy is to open the order on the current bar based on the indicator box color 2 bars ago.

              Comment


                #8
                Hello neshnix89,

                You could certainly review the indicators code further to see if that would meet your goals, if that logic works for your goal you could recreate that type of logic in the strategy.

                Comment


                  #9
                  Hi Jesse,

                  Can you assist to create the logic? I'm not really good with codes. Appreciate if you can help.

                  Comment


                    #10
                    Hello neshnix89,

                    No that would be a process you need to complete if you wanted to reuse that logic in your own script. Part of developing strategies will be testing the modifications you make to ensure it works toward your goal. As this indicator is fairly complex that would require you to go through that code and move it over confirming you get the expected results as you make modifications. Once you are happy with the result of the plotting when used in the strategy you could explore the areas in the code which control plotting and then use those areas to do strategy related tasks. You will need to use Prints to confirm that the conditions are being called when you want based on your overall goal.



                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by NullPointStrategies, Today, 05:17 AM
                    0 responses
                    52 views
                    0 likes
                    Last Post NullPointStrategies  
                    Started by argusthome, 03-08-2026, 10:06 AM
                    0 responses
                    130 views
                    0 likes
                    Last Post argusthome  
                    Started by NabilKhattabi, 03-06-2026, 11:18 AM
                    0 responses
                    70 views
                    0 likes
                    Last Post NabilKhattabi  
                    Started by Deep42, 03-06-2026, 12:28 AM
                    0 responses
                    44 views
                    0 likes
                    Last Post Deep42
                    by Deep42
                     
                    Started by TheRealMorford, 03-05-2026, 06:15 PM
                    0 responses
                    48 views
                    0 likes
                    Last Post TheRealMorford  
                    Working...
                    X