How to make a cumulative line indicator
Posted: Mon Feb 28, 2022 1:33 am
by Jxmmy2x
Need help or any tips to making an indicator plot the DIFFERENCE between the previous day close to the current day open on the daily timeframe???? Any help would be appreciated.
Re: How to make a cumulative line indicator
Posted: Mon Feb 28, 2022 2:36 am
by chooka
Hey there,
Something like this might do the trick?
Code: Select all
//@version=5
indicator("Prev_Day_Close",overlay=false)
prev_day_close = request.security(syminfo.ticker,"1D",close[1])
curr_day_open = request.security(syminfo.ticker,"1D",open[0])
difference = curr_day_open - prev_day_close
plot(difference)