Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

plot trendline on click chart

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

    plot trendline on click chart

    Hi,

    i would like to know if it's possible to click on the chart and with a script it get the time stamp, the bar index and the price value.
    the idea is with 2 click on the chart i get a trendline that i can use in the code for strategy.
    i manage to find that in pine on tradingview and i was wondering if it was possible with NT.

    here the code on pine to get that:
    Code:
            var TriangleLow_A = input.time(timestamp("2021-12-30"), confirm=true, title="Bull Trendline : [A] Pivot low")
              var TriangleLow_B = input.time(timestamp("2021-12-30"), confirm=true, title="Bull Trendline : [B] Pivot low")
                // 2. get bar_index of pivotpoint
              BigL1 := TriangleLow_A == time ? bar_index : na
              BigL2 := TriangleLow_B == time ? bar_index : na
                // 2. get price of pivotpoint  
              BigL_price1 = BigL1 ? low : na
              BigL_price2 = BigL2 ? low : na

    #2
    Hello cbadr,

    Below is a link to an example of fetching the price and time converted from mouse click coordinates.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      oh perfect it seems to be what i am looking for
      thanks !

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      601 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      347 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      103 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      559 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      558 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X