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:
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


Comment