Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy build based on price in between indicator

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

    Strategy build based on price in between 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 the lower ema line of the indicator (simplifyindicator) to go thru the body of the previous candle without the high and low of the candle touching the upper ema line of the indicator?

    2) How do I add condition for the strategy to check the upper ema line of the indicator (simplifyindicator) to go thru the body of the previous candle without the high and low of the candle touching the lower ema line of the indicator?

    3) How do i open order on the previous candle body high or low? the current price maybe obove or below the order that i wanna open based on the previous candle body.

    Appreciate the input.
    Attached Files

    #2
    Hello neshnix89,

    If you have not already, be sure to watch the 'Automate Your Trading with NinjaTrader's Strategy Builder' training video in it's entirety.



    What are you meaning by go thru the body of the previous candle?
    Are you meaning the EMA with 1 bar ago is less than the Low of 1 bar ago and the EMA of 0 bars ago (the current bar) is greater than the High of 1 bar ago (the previous bar)?
    How would this be possible without the EMA touching the high and low?

    While you would not be able to instantly fill an order at any price, you can submit a limit or stop order at the price of the previous bars high or low which would fill if the price came and met the order while it is working.

    In the 'Do the following' section you can select Order Management -> Enter long position with a limit order. Then in the price select Price -> High and set the Bars ago to 1.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi Chelsea,

      Sorry, let me rephrase.

      I want to check the 1 bar ago EMA is between the 1 bar ago open and close price.

      Comment


        #4
        Hello neshnix89,

        To know the EMA of 1 bar ago is less the close of 1 bar ago and greater than the open of 1 bar ago and the close is greater than the open (an up bar), or the EMA is less than the open and greater than the close when the close is less than the open (a down bar) use condition groups joined with 'If Any' which joins the condition groups with 'or'. One group will be for the up bar and one group will be for the low bar. 'If All' is used within the condition group so all of the conditions for an up bar and the EMA being greater than the open and less than the close must be true (and vice versa for a down bar)
        1. In the Conditions and Actions select 'If Any' of the following conditions are met -> click group
        2. For each group added, in the Condition Group Editor select 'If All' of the following conditions are met
        3. Click add to add a condition to the group
        4. On the left select Price -> Close, set Bars ago to 1
        5. In the center select Greater
        6. On the right select Price -> Open, set Bars ago to 1
        7. Click Ok to add the condition to the group
        8. Click add
        9. On the left select Indicator -> EMA, set Bars ago to 1
        10. In the center select Greater
        11. On the right select Price -> Open, set Bars ago to 1.
        12. Click Ok to add the condition to the group
        13. Click add
        14. On the left select Indicator -> EMA, set Bars ago to 1.
        15. In the center select Less
        16. On the right select Price -> Close, set Bars ago to 1.
        17. Click Ok to add the condition to the group
        18. Click Ok to add the group to the Conditions
          -
        19. click group
        20. select 'If All' of the following conditions are met
        21. Click add to add a condition to the group
        22. On the left select Price -> Close, set Bars ago to 1
        23. In the center select Less
        24. On the right select Price -> Open, set Bars ago to 1
        25. Click Ok to add the condition to the group
        26. Click add
        27. On the left select Indicator -> EMA, set Bars ago to 1
        28. In the center select Less
        29. On the right select Price -> Open, set Bars ago to 1
        30. Click Ok to add the condition to the group
        31. Click add
        32. On the left select Indicator -> EMA, set Bars ago to 1
        33. In the center select Greater
        34. On the right select Price -> Close, set Bars ago to 1
        35. Click Ok to add the condition to the group
        36. Click Ok to add the group to the Conditions
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Hi Chelsea,

          That's great. Can the EMA be replaced with the EMA from the attached indicator? In the indicator, we have 2 parallel EMA, bottom EMA and above EMA which are plotted simultaneously.

          Comment


            #6
            Hello neshnix89,

            You can use any indicator from the Indicators available in the Indicators section (which set a plot).

            You can select the plot used for the comparison from the Plot drop-down.
            Chelsea B.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by NullPointStrategies, Yesterday, 05:17 AM
            0 responses
            54 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
            72 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
            49 views
            0 likes
            Last Post TheRealMorford  
            Working...
            X