Range bar

 

how to write

if (high-low for current bar)<(high-low for previous bar) ( alert )


how to write it or make it indicator



please

 
gozila:

how to write

if (high-low for current bar)<(high-low for previous bar) ( alert )

Read the Documentation . . .

if(High[0] - Low[0] < High[1] - Low[1]) Alert("This is an alert ! !");
 
gozila:


what is wrong here with this code

if(High[0] - Low[0] < High[1] - Low[1]) && if iVolume (0.0.0)>ivolume(0.0.1) alert ("alert")

my idea here if range current bar < range previous bar and volume current bar >volume previous bar alert


Please read the Book and Documentation,  especially how to us   if   and  &&   correctly.
 
if(High[0]-Low[0]<High[1]-Low[1] && Volume[0]>Volume[1] )
        Alert("Current bar range is less than previous bar");
I think this is what you asked for. Test yourself and report here buddy,