Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to set two indicator for a buy/sell entry position

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

    How to set two indicator for a buy/sell entry position

    Hi,
    I would like to set a signal to buy and sell when the Tenkan-sen cross above/below the KiJun-sen ( Ichimocu indicator) but with the MACD cross above/below the avg...not at the same time.
    Two different signal that generate a signal to entry a position.

    I'm programming with the strategy builder on NT8

    Thanks for any help


    #2
    Hello Italianforex,

    Thanks for your post.

    When you have two different signals occurring at different times, you can create and use a bool variable for each that you set true when the condition occurs and for your entry condition, you can check that both bools are true.

    You would need to determine some condition that allows you to reset those bools when appropriate.


    Comment


      #3
      Hi thanks for the quick reply.
      do you have some example or a video to understand it?Not sure how to set it in the strategy builder
      Thanks

      Comment


        #4
        Hello Italianforex,

        Thanks for your reply.

        We do not have any examples, videos for this specific of a topic.

        To create a bool variable, please see the help guide section, "Understanding the Inputs and Variables screen" on this page: https://ninjatrader.com/support/help...er_screens.htm

        In one set you would check for one condition (MACD or Ichimoku) to be true and when it is then in the action (Do the following) section you would set the associated bool to true. The bools you created would be found in the Misc folder and would have the word "Set" in front of them. For example, if one bool was named MACDbool then in the Misc folder you would find "Set MACDbool". You would select that bool and then check the checkbox which sets the bool to true.

        You would repeat in another set where the other condition is checked and when true it's associated bool (that you previously created) would need to then be set true.

        In yet another set, you would then check the state of both bools and these would be found under "user variables" folder to see when they are true and the action section would be of course where you place your entry order.

        You will have to determine when you want to reset the bools back to false. You could use the same entry order set to change the status of the bools from true to false (in the action section where the entry order is) and that might work out to be the best for you.

        You may want to include some visual debugging in your sets so you can look at the chart and observe when the strategy builder knows that each condition/set is true (which lets you know what it is working with on each bar). The easy way to do this is to add a drawing object in each set that would plot on the chart a colored dot, for instance, representing when set 1 is true and perhaps a different colored dot when set 2 is true and so on (make sure you "offset" the dots so they don't lay over each other). To help with this, here is a short video you can download/view on how to show markers and how to place them: https://paul-ninjatrader.tinytake.co...A4M184NTkwOTg3

        Comment


          #5
          Hello Italianforex,

          I spent some time to create a short educational video on how to handle two asynchronous conditions for your entries: https://paul-ninjatrader.tinytake.co...OF8xMDYwMjE0OA

          This combined with the previous video on the markers should get you started.

          Comment


            #6
            Awesome..Thank you very much.

            Comment


              #7
              So,I have been able to set the signals in the way I want it and everything work great,now to improve the strategy I would like to enter multiple contracts with different target and after hit the first target move the stop loss.
              Is it possible to do in the Strategy builder NT8?Can't make it work.
              Example available of multiple target ?

              Thanks for any replay.

              Comment


                #8
                Hello Italianforex,

                Thanks for your post and glad to hear of your strategy building success.

                The strategy builder does provide some limitations in that you cannot change the StopLoss() dynamically (IE: change it while in use).

                In the strategy builder for multiple entries you would need to place addition orders (For example if you now have EnterLong() then you would need to add EnterLong() again for the 2nd order, etc. tec.). You can assign different stops and different targets using "signal names" to the different entries. So, for example, if you name your first entry "One", you can create a profit and stop also with the signal name of "One" and these would then work together. If for example you name the next entry order "Two" you can use entirely different stop and profit as long as they also use "Two" as the signal name. You could use a TrailStop() on the second order instead of a a fixed stop.


                Last edited by NinjaTrader_PaulH; 08-07-2019, 08:17 AM. Reason: spelling correction

                Comment


                  #9
                  Thanks for the replay,
                  I will try the TrailStop() in the second entry.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by NullPointStrategies, 03-13-2026, 05:17 AM
                  0 responses
                  87 views
                  0 likes
                  Last Post NullPointStrategies  
                  Started by argusthome, 03-08-2026, 10:06 AM
                  0 responses
                  151 views
                  0 likes
                  Last Post argusthome  
                  Started by NabilKhattabi, 03-06-2026, 11:18 AM
                  0 responses
                  80 views
                  0 likes
                  Last Post NabilKhattabi  
                  Started by Deep42, 03-06-2026, 12:28 AM
                  0 responses
                  53 views
                  0 likes
                  Last Post Deep42
                  by Deep42
                   
                  Started by TheRealMorford, 03-05-2026, 06:15 PM
                  0 responses
                  62 views
                  0 likes
                  Last Post TheRealMorford  
                  Working...
                  X