grazie Alex
vedo che se metto le parentesi graffe, devo collegarle tra loro con else ... giusto?
vedo che se metto le parentesi graffe, devo collegarle tra loro con else ... giusto?
if (vCCI20_of_OHLC4.getValue(CCIStudy.CCI) >= 100)
onAction1();
else
onAction1b();
if (vCCI20_of_OHLC4.getValue(CCIStudy.CCI) >= 60 && vCCI20_of_OHLC4.getValue(CCIStudy.CCI) <100)
onAction3();
else
onAction3b();
function onAction1() {
drawTextRelative(0, low()-.5, "é", Color.green, null, Text.TOP|Text.CENTER|Text.BOLD, "Wingdings", 10, "verde"+getCurrentBarCount());
}
function onAction1b(){
removeText("verde"+getCurrentBarCount())
function onAction3() {
drawTextRelative(0, low()-.5, "p", Color.blue, null, Text.BOTTOM|Text.CENTER|Text.BOLD, "Wingdings", 10, "blue"+getCurrentBarCount());
}
function onAction3b(){
removeText("blue"+getCurrentBarCount())
drawTextRelative(0, low()-.5, "é", Color.green, null, Text.TOP|Text.CENTER|Text.BOLD, "Wingdings", 10, "verde"+getCurrentBarCount());
drawTextRelative(0, low()-.5, "p", Color.blue, null, Text.BOTTOM|Text.CENTER|Text.BOLD, "Wingdings", 10, "blue"+getCurrentBarCount());
drawTextRelative(0, low()-.5, "é", Color.green, null, Text.TOP|Text.CENTER|Text.BOLD, "Wingdings", 10, "verde"+getCurrentBarCount());
drawShape(Shape.UPARROW,BelowBar1,Color.green,"verde"+getCurrentBarCount());
removeTextRelative("verde"+getCurrentBarCount());
removeShape("verde"+getCurrentBarCount());
drawTextRelative(0, BelowBar1, "é", Color.green, null, Text.PRESET|Text.CENTER|Text.BOLD, "Wingdings", 10, "verde"+getCurrentBarCount());
function preMain() {
setPriceStudy(true);
setStudyTitle("Fra");
setCursorLabelName("CCI Pulse", 0);
setDefaultPriceBarColor(Color.black);
setColorPriceBars(true);
return formatPriceNumber(vCCI.getValue(CCIStudy.CCI));
if(vCCI.getValue(CCIStudy.CCI)==null) return;// questo e' il null check
return vCCI.getValue(CCIStudy.CCI).toFixed(2);
Comment