MG...I used a RSI4 <>50 and a 14( I meant to use 10) it's easier in RQ: rsi(4) > 50, rsi(4) <50
I haven't set the bands yet...will do it later after I pull up my hex code tool..for the color black, I guess (10,10,10) will work? ................................esignal:
function preMain() { /* Set the title that will appear in the study pane */ setStudyTitle("RSI(4)");
/* Set the label that will appear in the cursor window */ setCursorLabelName("RSI clb");
/* Force the scale to be 0->100 */ setStudyMin(0.0); setStudyMax(100.0);
/* Add Bands to appear in the study window */ addBand(20, PS_SOLID, 1, Color.RGB(0,0,0)); addBand(80, PS_SOLID, 1, Color.RGB(0,0,0)); }
function main(nInputLength) { if(nInputLength == null) nInputLength = 4;
var vValue = call("/library/RSIStandard.efs", nInputLength);
/* * This is optional. You can set properties for each bar. */ if(vValue >= 50) { setBarStyle(PS_SOLID); setBarThickness(2); setBarFgColor(Color.black); setBarBgColor(Color.lime); } else if(vValue <= 50) { setBarStyle(PS_SOLID); setBarThickness(2); setBarFgColor(Color.black); setBarBgColor(Color.red); } /* * The return value is what will be plotted the chart. */ return (vValue);
} |