golden candle

#1
_SECTION_BEGIN("Unnamed 5");
SetChartOptions(0, chartShowArrows | chartShowDates);
SetChartBkColor(ParamColor("Outer Panel", colorBlack));
SetChartBkGradientFill(ParamColor("Upper Chart", colorDarkGrey), ParamColor("Lower Chart", colorDarkGrey));
GraphXSpace = Param("GraphXSpace", 10, 0, 100, 1);

colorHighliter = IIf(C >= O, ColorRGB(0, 128, 0), ColorRGB(128, 0, 0));

//Demand Point
colorDemandPoint = ParamColor("Demand Line", ColorRGB(0, 128, 255));
DemandPoint = (Ref(L, -1) < Ref(L, -2)) & (L < Ref(L, -1)) & (L < Ref(L, 1)) & (Ref(L, 1) < Ref(L, 2));

//Supply Point
colorSupplyPoint = ParamColor("Supply Line", ColorRGB(255, 128, 0));
SupplyPoint = (Ref(H, -1) > Ref(H, -2)) & (H > Ref(H, -1)) & (H > Ref(H, 1)) & (Ref(H, 1) > Ref(H, 2));

CountTrendBars = 0;
CurrentBar = BarCount - 1;
dx0 = dx1 = dy0 = dy1 = 0;
sx0 = sx1 = sy0 = sy1 = 0;
for (i = 0; i < BarCount; i++) {
CurrentBar = (BarCount - 1) - i;
if (DemandPoint[CurrentBar]) {
if (dx1 == 0 & dy1 == 0) {
dx1 = CurrentBar;
dy1 = L[CurrentBar];
} else {
dx0 = CurrentBar;
dy0 = L[CurrentBar];
}
if (dx0 != 0 & dx1 != 0 & dy0 != 0 & dy1 != 0) {
if (dy0 < dy1) {
a = (-dy0 + dy1) / (-dx0 + dx1);
b = dy0 - dx0 * a;
for (j = dx1; j < BarCount; j++) {
if (j != dx1) {
y2 = a * j + b;
if (C[j] < y2) {
dy1 = y2;
dx1 = j;
colorHighliter[j] = ColorRGB(128, 0, 128);
CountTrendBars[j] = dx1 - dx0 - 1;
break;
}
}
}
if (dy1 != y2) {
dy1 = y2;
dx1 = BarCount - 1;
}
Plot(LineArray(dx0, dy0, dx1, dy1, 0), "", colorDemandPoint, styleLine, Null, Null, 0, 02);
}
dx1 = dx0;
dy1 = dy0;
dx0 = dy0 = 0;
}
}
if (SupplyPoint[CurrentBar]) {
if (sx1 == 0 & sy1 == 0) {
sx1 = CurrentBar;
sy1 = H[CurrentBar];
} else {
sx0 = CurrentBar;
sy0 = H[CurrentBar];
}
if (sx0 != 0 & sx1 != 0 & sy0 != 0 & sy1 != 0) {
if (sy0 > sy1) {
a = (-sy0 + sy1) / (-sx0 + sx1);
ب = sy0 - sx0 * أ ؛
لـ (j = sx1؛ j <BarCount؛ j ++) {
إذا (ي! = sx1) {
y2 = a * j + b ؛
إذا (C [j]> y2) {
sy1 = y2 ؛
sx1 = ي ؛
colorHighliter [j] = ColorRGB (128 ، 128 ، 0) ؛
CountTrendBars [j] = sx1 - sx0 - 1 ؛
استراحة؛
}
}
}
إذا (sy1! = y2) {
sy1 = y2 ؛
sx1 = BarCount - 1 ؛
}
المؤامرة (LineArray (sx0، sy0، sx1، sy1، 0)، ""، colorSupplyPoint، styleLine، Null، Null، 0، 02) ؛
}
sx1 = sx0 ؛
sy1 = sy0 ؛
sx0 = sy0 = 0 ؛
}
}
}


//السعر
SetBarFillColor (colorHighliter) ؛
الرسم (C ، "إغلاق" ، IIf (colorHighliter == ColorRGB (128 ، 0 ، 128) ، ColorRGB (255 ، 0 ، 255) ، IIf (colorHighliter == ColorRGB (128 ، 128 ، 0) ، ColorRGB (255 ، 255 ، 0) ، IIf (C> O ، ColorRGB (0 ، 255 ، 0) ، IIf (C <O ، ColorRGB (255 ، 0 ، 0) ، ColorRGB (255 ، 255 ، 255)))) ، styleCandle ، Null ، Null ، 0 ، 1) ؛

//الصوت
/ * colorVolume = ParamColor ("حجم المساحة" ، ColorRGB (0 ، 0 ، 0)) ؛
قطعة الأرض (الحجم، ""، colorVolume، styleArea | styleOwnScale | styleNoLabel، Null، Null، 0، 0، 1) ؛ * /

العنوان = الاسم () + "- {{INTERVAL}} - {{التاريخ}} - فتح =" + NumToStr (O، 1.2) + "، مرتفع =" + NumToStr (H، 1.2) + "، منخفض =" + NumToStr (L، 1.2) + "، إغلاق =" + NumToStr (C، 1.2) + "(" + WriteVal (ROC (C، 1)، 1.2) + "٪)" ؛ / * ، الحجم = "+ WriteVal (الحجم ، 1.2) ؛ * /
_SECTION_END () ،
 
Last edited:
#2
Please, I need a spear of the golden candle which gives an entry signal from the bottom as well as the purple candle that gives an exit signal from the top. I also want to do a search and filter according to tags
 
Last edited:
Thread starter Similar threads Forum Replies Date
Tavnaz Forex 93
goldenvirus Introductions 3
XRAY27 Technical Analysis 0
D Equities 2
G Introductions 0

Similar threads