Happy Thansgiving Everyone;
Could someone help me with this efs. My "Sell" position on my price chart is to the right of the candle. I want it to be on top of the candle. My "Buy" wording is correct, but I can't figure out how to change my "Sell" positioning.
Also, the wave file plays the day after, is there a way to make the wave file play for today?
Here is the efs.
var vLastAlert = -1;
function preMain() {
setPriceStudy(true);
setStudyTitle("ReversalCandlesr2");
setComputeOnClose(true);
}
function main() {
if (
close() <= low(-1)
) onAction1()
else if (
close() >= high(-1)
) onAction2();
return null;
}
function onAction1() {
if (vLastAlert != 1) drawTextRelative(0, high(), "Sell", Color.white, null, Text.top|Text.top|Text.BOLD, "dungeon", 12);Alert.playSound("Ohno.wav");
vLastAlert = 1;
}
function onAction2() {
if (vLastAlert != 2) drawTextRelative(-1, low(), "Buy", Color.black, null, Text.top|Text.top|Text.BOLD, "dungeon", 12);;Alert.playSound("yea.wav");
vLastAlert = 2;
}
Could someone help me with this efs. My "Sell" position on my price chart is to the right of the candle. I want it to be on top of the candle. My "Buy" wording is correct, but I can't figure out how to change my "Sell" positioning.
Also, the wave file plays the day after, is there a way to make the wave file play for today?
Here is the efs.
var vLastAlert = -1;
function preMain() {
setPriceStudy(true);
setStudyTitle("ReversalCandlesr2");
setComputeOnClose(true);
}
function main() {
if (
close() <= low(-1)
) onAction1()
else if (
close() >= high(-1)
) onAction2();
return null;
}
function onAction1() {
if (vLastAlert != 1) drawTextRelative(0, high(), "Sell", Color.white, null, Text.top|Text.top|Text.BOLD, "dungeon", 12);Alert.playSound("Ohno.wav");
vLastAlert = 1;
}
function onAction2() {
if (vLastAlert != 2) drawTextRelative(-1, low(), "Buy", Color.black, null, Text.top|Text.top|Text.BOLD, "dungeon", 12);;Alert.playSound("yea.wav");
vLastAlert = 2;
}
Comment