Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Knowing the current Pivot level

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

    Knowing the current Pivot level

    Hi,

    Writing strategies over here but does anyone have a snippet that shows the current market price and where on the pivot it is.

    Say for instance i wanna set a profit target for a pivot i insert something like the following:
    if (CrossAbove(Median, Pivots(PivotRange.Daily, HLCCalculationMode.CalcFromIntradayData, 20).R3, 1))
    {
    ExitLong("", "");
    }

    So if i wanna know the current daily pivot so i can make this more dynamic ?

    #2
    leinster, you can get the current market price with Close[0]. The code you posted would be correct for getting the current day's R3 pivot level. You can substitute in R2, R1, PP, S1, S2, or S3 for the other pivot levels. Sorry if I misunderstood your question - if so, please let me know.
    AustinNinjaTrader Customer Service

    Comment


      #3
      Question

      Hi,

      I think you misunderstand me.


      For instance if the price is 100 and the Pivot R1 is 110 and PP = 85 how can i tell which is the Pivot we are closest to.

      IE: i need to know current price based on what pivot are we closest too upwards and downwards. Its for a stop strategy...

      Many thanks

      Comment


        #4
        leinster, you would need to take the difference by comparing your levels to the Close[0] - then you know which level is currently the closest, returning the smallest difference to the last traded price.
        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by junkone, Today, 11:37 AM
        2 responses
        12 views
        0 likes
        Last Post junkone
        by junkone
         
        Started by frankthearm, Yesterday, 09:08 AM
        12 responses
        43 views
        0 likes
        Last Post NinjaTrader_Clayton  
        Started by quantismo, 04-17-2024, 05:13 PM
        5 responses
        35 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by proptrade13, Today, 11:06 AM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_Clayton  
        Started by love2code2trade, 04-17-2024, 01:45 PM
        4 responses
        35 views
        0 likes
        Last Post love2code2trade  
        Working...
        X