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.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        71 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        43 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        25 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        28 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        56 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X