Professional Documents
Culture Documents
Colore Candles Completo Bem Colorido
Colore Candles Completo Bem Colorido
Colore Candles Completo Bem Colorido
//Joselito
def candleSize = cHigh - cLow;
def diffBase = candleSize * 0.25;
def bCorpo = ((cMax <= cHigh - diffBase) && (cMin >= cLow + diffBase) &&
(cMax - cMin >= 5));
// Joselito no Topo
if ((cLow > pLow && cHigh > pHigh) && bCorpo) {
if (cOpen > cClose) {
bar.setFill(0, 128, 255);
bar.setBorder(0, 128, 255);
} else {
bar.setFill(0, 128, 192);
bar.setBorder(0, 128, 192);
}
}
if ((cHigh >= pHigh) && (aLow <= pLow && aHigh <= pHigh) && !(aMax < pMax &&
aMin > pMin) || (pHigh > cHigh && pLow < cLow && index < itens - 1)) {
if (pOpen > pClose) {
pBar.setFill(255, 0, 0);
pBar.setBorder(255, 0, 0);
} else {
pBar.setFill(0, 255, 0);
pBar.setBorder(0, 255, 0);
}
}
//Martelo
def mBase = candleSize * 0.4;
if (cMin >= cHigh - mBase && cMax >= cHigh - 20) {
if (cOpen > cClose) {
bar.setFill(128, 128, 128);
bar.setBorder(128, 128, 128);
} else {
bar.setFill(192, 192, 192);
bar.setBorder(192, 192, 192);
}
}
//Estrela Cadente
if (cMax <= cLow + mBase && cMin <= cLow + 20) {
if (cOpen > cClose) {
bar.setFill(128, 128, 128);
bar.setBorder(128, 128, 128);
} else {
bar.setFill(192, 192, 192);
bar.setBorder(192, 192, 192);
}
}
//inside
if (pHigh > cHigh && pLow < cLow) {
if (cOpen > cClose) {
bar.setFill(255, 255, 128);
bar.setBorder(255, 255, 128);
} else {
bar.setFill(255, 255, 0);
bar.setBorder(255, 255, 0);
}
}
//Engolfo
if (pMax < cMax && pMin > cMin) {
if (cOpen > cClose) {
bar.setFill(255, 128, 0);
bar.setBorder(255, 128, 0);
} else {
bar.setFill(255, 128, 64);
bar.setBorder(255, 128, 64);
}
}
//Gravida
if (pMax > cHigh && pMin < cLow) {
if (cOpen > cClose) {
bar.setFill(255, 128, 0);
bar.setBorder(255, 128, 0);
} else {
bar.setFill(255, 128, 64);
bar.setBorder(255, 128, 64);
}
}
}