-2

Dont want like thisTitle says it all, i want like this

When strategy says long Entire chart turns green, previous signal should not matter , It should not paint zebra , green red green...

Gradient background even better if possible.

Complete chart remains green if position size is greater than 0

I tried few solutions but all give zebra , plot , fill , line.fill ...

Newbie friendly answer would help more...

One of the codes i tried ,

//////////

var color bkgcolor = na
var color green = //color.new(color.green,90)
var color red = color.new(color.red,90)

If strategy.position_size > 0 and filter == true 
    bkgcolor := green 
If strategy.position_size < 0 and filter== true 
    bkgcolor:= red 
bgcolor(color= bkgcolor) 

///////// Plz help ,

1 Answers1

0

Complete Fix:

backcolor= color.new(color.white,100)
if IsLong and PLscreen == true 
    backcolor := color.new(color.green,70)
if IsShort and PLscreen == true 
    backcolor := color.new(color.red,70) 
var tot = 0
tot := bar_index + 1
lowsec =ta.lowest(low,tot)
highsec = ta.highest(high,tot)
p1=plot(highsec,color=color.new(color.green,70))
p2=plot(lowsec,color=color.new(color.red,70))
fill(p1,p2,color=backcolor)
  • i have edited* uploaded image examples in first line , for explaining better. no this does the zebra effect. not plain. – venky ubuntu May 19 '22 at 01:13