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

enter pivots point on first touch

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

    enter pivots point on first touch

    Basic strategy, when the opening is higher than the pivot point (pp)
    I want to enter long when the price pullback to pivot, and when the opening is lower than pivot
    I want to enter short when the price pullback pivots.

    #2
    Hello zakim,

    Welcome to the NinjaTrader forums!

    Below is a link to a forum post with helpful resources on getting started with C# and NinjaScript.
    https://ninjatrader.com/support/foru...040#post786040

    I recommend you watch the 'Automate Your Trading with NinjaTrader's Strategy Builder' training video to get started.

    You can also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services. Please let me know if you would like our NinjaTrader Ecosystem team follow up with you with a list of affiliate consultants who would be happy to create this script or any others at your request or provide one on one educational services.


    'opening is higher than the pivot point (pp)'

    Open[0] > Pivots(PivotRange.Daily, HLCCalculationMode.CalcFromIntradayData, 0, 0, 0, 20).Pp[0]

    https://ninjatrader.com/support/help...nt8/pivots.htm

    'price pullback to pivot'
    What does this mean?
    Price crosses .Pp[0] first, then crosses .R1[0] second?
    https://ninjatrader.com/support/foru...72#post1131172

    'opening is lower than pivot'
    Open[0] < Pivots(PivotRange.Daily, HLCCalculationMode.CalcFromIntradayData, 0, 0, 0, 20).Pp[0]

    'price pullback pivots'
    What does this mean. Please be specific about the values you want to compare and not just a general idea.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi
      thank you for your answer
      I use a strategy builder
      I want that when the market opens higher than the pivot point (p), I go long on PP when the market touches it the first time (just one trade)

      and when the market opens lower than the pivot point (p)
      I sell when the market touches the PP the first time (just one trade)

      Comment


        #4
        Hello zakim,

        "market opens higher than the pivot point", is this meaning you want to trigger this on the first bar update of a new session with the session open price?

        The first bar of a session is marked with Bars.IsFirstBarOfSession being true. In the Strategy Builder this is in Misc

        When true you can compare the Open[0] of the bar (the first bar of the session) to the indicator .Pp[0] value.

        Or if you were wanting to compare this on a later bar you can reference the CurrentDayOHL().CurrentOpen[0] to get the open of a session.



        You can use bools to know an action has occurred. Set the bool to true when the order is submitted. Require the bool to be false in the condition. Once the condition triggers, it will not trigger again until the bool is set back to false. (You could choose to reset when First bar of session is true)
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by futtrader, 04-21-2024, 01:50 AM
        4 responses
        41 views
        0 likes
        Last Post futtrader  
        Started by Option Whisperer, Today, 09:55 AM
        1 response
        11 views
        0 likes
        Last Post bltdavid  
        Started by port119, Today, 02:43 PM
        0 responses
        7 views
        0 likes
        Last Post port119
        by port119
         
        Started by Philippe56140, Today, 02:35 PM
        0 responses
        7 views
        0 likes
        Last Post Philippe56140  
        Started by 00nevest, Today, 02:27 PM
        0 responses
        7 views
        0 likes
        Last Post 00nevest  
        Working...
        X