Hi,
i have got the message:
"Line 26 ADX is not defined"
Line 26 is
"var myValue = ((1/adx(5, 2)).toFixed(2))*10;"
What`s wrong?
Thanks
Is it possible to link a sound, if eg. ADX is
above 40?
function preMain() {
setPriceStudy(true);
setStudyTitle("ADX");
}
var bFlash = true;
var myColor = Color.white;
var mybgColor = Color.green;
function main() {
var myValue = ((1/adx(5, 0)).toFixed(2))*10;
mybgColor = Color.white;
if (bFlash == false) {
if (myValue<=2) {
//myColor = Color.black;
mybgColor = Color.red;
} else if (myValue>2 && myValue <= 4) {
//myColor = Color.gray;
mybgColor = Color.lime;
} else if (myValue>4) {
//myColor = Color.white;
mybgColor = Color.navy;
}
bFlash = true;
} else if (bFlash == true) {
bFlash = false;
}
drawTextRelative( 0, AboveBar8, myValue , Color.black, mybgColor, Text.PRESET | Text.BOLD, null, 10, "text" );
return;
}
i have got the message:
"Line 26 ADX is not defined"
Line 26 is
"var myValue = ((1/adx(5, 2)).toFixed(2))*10;"
What`s wrong?
Thanks
Is it possible to link a sound, if eg. ADX is
above 40?
function preMain() {
setPriceStudy(true);
setStudyTitle("ADX");
}
var bFlash = true;
var myColor = Color.white;
var mybgColor = Color.green;
function main() {
var myValue = ((1/adx(5, 0)).toFixed(2))*10;
mybgColor = Color.white;
if (bFlash == false) {
if (myValue<=2) {
//myColor = Color.black;
mybgColor = Color.red;
} else if (myValue>2 && myValue <= 4) {
//myColor = Color.gray;
mybgColor = Color.lime;
} else if (myValue>4) {
//myColor = Color.white;
mybgColor = Color.navy;
}
bFlash = true;
} else if (bFlash == true) {
bFlash = false;
}
drawTextRelative( 0, AboveBar8, myValue , Color.black, mybgColor, Text.PRESET | Text.BOLD, null, 10, "text" );
return;
}
Comment