Hi there,
Do you know how to change this formula to calculate the oscillator
based on " < low" only, rather than both low and high?
I would like to have one oscillator that displays only buy, not buy and sell.
Thank you
Peter
var vParSAR = new ParabolicStudy(0.02, 0.02, 0.2);
var vLastAlert = -1
function preMain() {
setPriceStudy(true);
setStudyTitle("AUD");
setCursorLabelName("AUD", 0);
setDefaultBarFgColor(Color.blue, 0);
setDefaultBarThickness(3, 0);
setPlotType(PLOTTYPE_LINE, 0);
}
function main() {
if (
vParSAR.getValue(ParabolicStudy.STOP) < low()
) onAction1()
else if (
vParSAR.getValue(ParabolicStudy.STOP) > high()
) onAction2();
return vParSAR.getValue(ParabolicStudy.STOP);
}
function postMain() {
}
function onAction1() {
if (vLastAlert != 1) Alert.playSound("C:\\Program Files\\eSignal\\Sounds\\BAUD.wav");
if (vLastAlert != 1) drawTextRelative(0, open(0), "B", Color.RGB(0,0,0), Color.RGB(25,200,25), Text.LEFT, "Arial", 34);
vLastAlert = 1;
}
function onAction2() {
if (vLastAlert != 2) Alert.playSound("C:\\Program Files\\eSignal\\Sounds\\SAUD.wav");
if (vLastAlert != 2) drawTextRelative(0, open(0), "S", Color.RGB(255,0,0), Color.RGB(0,0,0), Text.LEFT, "Arial", 34);
vLastAlert = 2;
}
Do you know how to change this formula to calculate the oscillator
based on " < low" only, rather than both low and high?
I would like to have one oscillator that displays only buy, not buy and sell.
Thank you
Peter
var vParSAR = new ParabolicStudy(0.02, 0.02, 0.2);
var vLastAlert = -1
function preMain() {
setPriceStudy(true);
setStudyTitle("AUD");
setCursorLabelName("AUD", 0);
setDefaultBarFgColor(Color.blue, 0);
setDefaultBarThickness(3, 0);
setPlotType(PLOTTYPE_LINE, 0);
}
function main() {
if (
vParSAR.getValue(ParabolicStudy.STOP) < low()
) onAction1()
else if (
vParSAR.getValue(ParabolicStudy.STOP) > high()
) onAction2();
return vParSAR.getValue(ParabolicStudy.STOP);
}
function postMain() {
}
function onAction1() {
if (vLastAlert != 1) Alert.playSound("C:\\Program Files\\eSignal\\Sounds\\BAUD.wav");
if (vLastAlert != 1) drawTextRelative(0, open(0), "B", Color.RGB(0,0,0), Color.RGB(25,200,25), Text.LEFT, "Arial", 34);
vLastAlert = 1;
}
function onAction2() {
if (vLastAlert != 2) Alert.playSound("C:\\Program Files\\eSignal\\Sounds\\SAUD.wav");
if (vLastAlert != 2) drawTextRelative(0, open(0), "S", Color.RGB(255,0,0), Color.RGB(0,0,0), Text.LEFT, "Arial", 34);
vLastAlert = 2;
}
Comment