• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How can I have Strategy Wizard wait to confirm a trigger?

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

    How can I have Strategy Wizard wait to confirm a trigger?

    New to the Strategy Wizard and Condition Builder, my apologies if this has an obvious answer I'm overlooking.
    I'm putting together a basic moving average cross where the cross will trigger a trade.
    I put the lookback period on the cross to "4" and have a separate condition where the fast moving avg is either greater than or less than the slow moving avg (depending on the cross) as a confirmation. Moving averages can stay together or intertwine for an extended period. I am looking for the trade to be triggered based on the cross but actually occur once the averages diverge, if they indeed diverge in the direction of said cross. If they diverge in the opposite direction of the cross, than trade wouldn't occur. Any thoughts on which conditions can do that for me. Any help is most appreciated.
    Thanks

    #2
    Hello decoda,

    Thank you for your post and welcome to the NinjaTrader Support Forum!

    So we are looking for the fast crossing above the slow, then we say the direction is up, if the fast goes down then trade cannot occur? Likewise, if the fast crosses below the slow, then we say the direction is down, is the fast goes up then trade cannot occur?

    I look forward to your response.
    Patrick H.NinjaTrader Customer Service

    Comment


      #3
      Patrick,
      Yes, that is correct. In addition, the trade would not happen until an actual divergence beyond the cross has occurred.
      Thanks for your help.

      Comment


        #4
        Hello decoda,

        Thank you for your response.

        Please detail what you mean by divergence. Is this both moving averages trending in the same direction but different from the previous direction, or is this both moving average moving away from each other by a set value?
        Patrick H.NinjaTrader Customer Service

        Comment


          #5
          Patrick,
          Essentially, I want the two moving averages moving away from each other. It doesn't matter direction, as long as the divergence is in the same direction as the cross (ex: fast crosses above slow but stays with the slow for a number of bars, once the fast breaks away from the slow in the upward direction; the trade is triggered. If it breaks away to the downside, the signal is reset til the next cross). My main concern is getting whipsawed when the two averages sit on top of each other for a period of time. The divergence can be a set tick/$ amount or a "greater than/less than" scenario. Thanks again for your help.

          Comment


            #6
            Hello decoda,

            Thank you for your response.

            Can you provide the set tick amount and expand on how you would calculate the divergence base don greater than or less than?
            Patrick H.NinjaTrader Customer Service

            Comment


              #7
              Patrick,
              For example, the divergence could be 1 tick or .01 of $ value on a crude oil (CL) future as one option or another option would be the following statement (change terminology as needed so Strategy Wizard/Condition Builder understands):
              "after fast MA crosses above slow MA, trade when fast MA > slow MA". I have the cross above setting with a lookback of 4, so the hope is the trade occurs 4 bars after the cross, provided the fast MA stays above slow MA. If they're still more or less equal at that point, I would still like the trade to trigger once the fast MA breaks away to the upside, no matter how many bars down the road it is.
              Thanks

              Comment


                #8
                Hello decoda,

                Thank you for your patience.

                I have crated a strategy outside of the Strategy Wizard for this example as I needed to use items that are not available in the Strategy Wizard. I have also created a video explaining the strategy.

                The video is available at the following link: http://screencast.com/t/wKQtBtW1

                Download the .zip attached to this response to your desktop and then go to File > Utilities > Import NinjaScript > and select the file. You can then view the file under Tools > Options > Edit NinjaScript Strategy. It will be called DecodasCrossStrategy.
                Attached Files
                Patrick H.NinjaTrader Customer Service

                Comment


                  #9
                  Patrick,
                  That's awesome, thanks for going through the trouble of putting this together for me. The video explained everything well, I shouldn't have a difficult time tweaking things if need be. I appreciate
                  the help!
                  Thanks again

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by NeuTronite, Today, 08:40 PM
                  0 responses
                  1 view
                  0 likes
                  Last Post NeuTronite  
                  Started by tvaughan4, Today, 06:00 PM
                  0 responses
                  4 views
                  0 likes
                  Last Post tvaughan4  
                  Started by Lisa Marshall, Today, 04:32 PM
                  0 responses
                  2 views
                  0 likes
                  Last Post Lisa Marshall  
                  Started by Lisa Marshall, Today, 04:17 PM
                  0 responses
                  7 views
                  0 likes
                  Last Post Lisa Marshall  
                  Started by Lisa Marshall, Today, 04:11 PM
                  0 responses
                  6 views
                  0 likes
                  Last Post Lisa Marshall  
                  Working...
                  X