Relative Content

Tag Archive for pine-scriptpine-script-v5tradingview-api

Pine Script: Prevent Recalculation of Higher Timeframe Logic When Switching Timeframes

Objective: If consolidation zones are plotted at Upper value (example 53000 and lower value 52500) with lines, the same should be visible on 5 min chart at same levels. This is to see consolidation zone of higher timeframes on the chart with lower timeframe. with below code, the zones are identified and plotted correctly on 15 min chart but same zone levels are not plotted when the chart is changed to 5 min time frame.

Run code at custom duration timeout intervals

I want to run code in an indicator at custom duration timeout intervals in pine script. But pine script runtime behaves in strange way. First it waits then it start logging at every second.
How can I achieve this functionality.

How to remove the zones which are tested

I am facing this problem in my custom indicator on trading where i am able to draw the zones but i want to remove those zones which are either tested (price has come in contact with the zone) or violated (price which went crossed the zones)

if first condition met then ignore other condition

please help, in this code if first condition met then ignore other condition. Like if fvg_5_up and above_rsi[2] condition are true then not calculate others like python if, elif and else function. Same if fvg_5_up and above_rsi[2],[3] are not condition met but fvg_5_up and above_rsi[4] and fvg_5_up and above_rsi[5] met then plotshape only first condition met ‘fvg_5_up and above_rsi[4]’. some time met all 5 condition but plotshape only first condition. please help me.