Color BarsThis script will paint a color bar when 2 conditions are met:1. This bar's low is the lowest of last 5 bar's lows 2. This bar has closed above the previous bar's close. If both conditions are true, paint this bar green. And the converse for a sell (i.e. highest of last 5 bar highs, close below previous bar's close, paint bar red) Cut the script from this example and paste it into the script editor, and save it to a file you name. To use, display a chart, and then select the Color Bar button, and on the drop down panel select the #3 button. This will add a user defined color bar study to the chart, which will call the script with Who=43 which we test for and execute the logic. var i,barindex: integer; |