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

Reference Points

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

    Reference Points

    It there a way thru the GUI or coding to reference a point where 2 moving averages cross. Say for example i want to say when EMA 2 crosses below the point where EMA 2 crossed above EMA 5 - enter short?

    #2
    Not sure what you mean by this exactly. You can code cross overs with CrossAbove() and CrossBelow() if that is what you are asking for.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Reference Points

      what i am asking is can i create a point of reference meaning this. Lets say GBP is rising and the ema 2 crosses above the ema 13. That point where they cross would be a reference point. I can then say when ema 2 crosses (at some point later in time) below the equivalent price at which the ema 2 crossed above the ema 13 - enter me short. so say the initial cross was at a price of 1.6550 and who knows maybe price went up to 1.6750, regardless, when ema 2 crosses below 1.6550, a point of reference created by the initial cross it will then take me short.

      Comment


        #4
        I believe this could get you started in the direction of what you seek: with CalculateOnBarClose set to false (updates on each incoming tick) evaluate the CrossOver rule and then the tick it returns 'true' save the last price to a variable and submit this a Entry limit order then. Of course you would need to add some safeguards against multiple orders being generated due to running this each tick and thus your entry condition can be become true / false multiple times intrabar.
        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by timko, Today, 06:45 AM
        1 response
        7 views
        0 likes
        Last Post gaz0001
        by gaz0001
         
        Started by Waxavi, 04-19-2024, 02:10 AM
        3 responses
        41 views
        0 likes
        Last Post gaz0001
        by gaz0001
         
        Started by Max238, Today, 01:28 AM
        2 responses
        26 views
        0 likes
        Last Post NinjaTrader_ChristopherJ  
        Started by Shansen, 08-30-2019, 10:18 PM
        25 responses
        949 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by JonesJoker, 04-22-2024, 12:23 PM
        8 responses
        45 views
        0 likes
        Last Post JonesJoker  
        Working...
        X