Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [st_line1, trend1] = getSuperTrend(multi1, period1)
- [st_line2, trend2] = getSuperTrend(multi2, period2)
- [st_line3, trend3] = getSuperTrend(multi1, period1) and (multi2, period2)
- // Plotting
- plot1 = plot(st_line1, color = trend1 == 1 ? color.green : color.red, style = plot.style_line, linewidth = 1, title = "SuperTrend 1")
- plot2 = plot(st_line2, color = trend2 == 1 ? color.green : color.red, style = plot.style_line, linewidth = 1, title = "SuperTrend 2")
- plot3 = plot(st_line1 + st_line2, color = trend3 == 1 ? color.yellow : color.blue, style = plot.style_line, linewidth = 1, title = "SuperTrend 3")
- fill(plot1, plot2, color = color.aqua, title = "Cloud")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement