The following script Draws Three Horizonal lines. Not sure what the problem is.
Thanks
This script was download from the TS Support Web Site:
Thanks
This script was download from the TS Support Web Site:
var vADX = null function preMain() { setStudyTitle("ADXDM"); setCursorLabelName("ADX", 0); setCursorLabelName("+DMI", 1); setCursorLabelName("-DMI", 2); setDefaultBarFgColor(Color.RGB(255, 0, 255), 0); //adx color setDefaultBarFgColor(Color.blue, 1); //+DI color setDefaultBarFgColor(Color.red, 2); //-DI color setDefaultBarThickness(2,0); //ADX Line thickness setDefaultBarThickness(1,1); //+DMI Line thickness setDefaultBarThickness(1,2); //-DMI Line thickness var fp1 = new FunctionParameter("DILength", FunctionParameter.NUMBER); fp1.setLowerLimit(1); fp1.setDefault(14); //Edit this value to set a new default var fp2 = new FunctionParameter("ADXLength", FunctionParameter.NUMBER); fp2.setLowerLimit(1); fp2.setDefault(14); //Edit this value to set a new default var fp3 = new FunctionParameter("ADXTrigger", FunctionParameter.NUMBER); fp3.setLowerLimit(0); fp3.setDefault(25); //Edit this value to set a new default } function main(DILength, ADXLength, ADXTrigger) { if (vADX == null) vADX = new ADXDMStudy(DILength, ADXLength); return new Array(vADX.getValue(ADXDMStudy.ADX), vADX.getValue(ADXDMStudy.PDI), vADX.getValue(ADXDMStudy.NDI)); }
Comment