Na hi Leute. (Wenn die Darstellung das Codes nicht richtig klappt, bitte habt ein Nachsehen. Es finde keine Voransicht meines Beitrages.) Es wird kompliziert. Ich habe diesen Indikator von hier genommen . https://www.prorealcode.com/prorealtime-indicators/rsi-classical-hidden-divergences-indicator/ stark eingekürzt und etwas umgeschrieben. RsiOverSold = 40 RsiOverBought = 60 MinBarRange = 3 MyRSI = RSI[14](close) // rsi[RsiPeriod](Close) Once Rge1 = 5*pipsize Once Rge2 = 8*pipsize RsiMax = MyRSI < MyRSI[1] and MyRSI[1] > MyRSI[2] and MyRSI[1] > RsiOverBought RsiMin = MyRSI > MyRSI[1] and MyRSI[1] < MyRSI[2] and MyRSI[1] < RsiOverSold if RsiMax then RSIMax1 = MyRSI[1] High1 = High[1] for I = MinBarRange to 80 if RsiMax[I] then RSIMax2 = MyRSI[I + 1] High2 = High[I + 1] If High1 > High2 and RSIMax1 < RSIMax2 then DRAWARROWDOWN(barindex, High + Rge1) coloured(255,192,203,255) DRAWTEXT("RSI", barindex, High + Rge2, SansSerif,Italic,10)coloured(0,0,255,255) //elsif High1 < High2 and RSIMax1 > RSIMax2 then //DRAWARROWDOWN(barindex, High + Rge1) coloured(255,192,203,255) //DRAWTEXT("hd_rsi", barindex, High + Rge2, SansSerif,Italic,10)coloured(0,0,255,255) endif break endif next endif return Wir haben also die Short-Signale mit “DrawArrowDown” beim RSI Diesen eingekürzten Indikator kann man nun sehr leicht in andere Divergenz-Indikatoren umschreiben, z.B. mit dem MFI RsiOverSold = 30 RsiOverBought = 70 MinBarRange = 3 MyRSI = MoneyFlowIndex[14] // aha Once Rge1 = 15*pipsize Once Rge2 = 17*pipsize RsiMax = MyRSI < MyRSI[1] and MyRSI[1] > MyRSI[2] and MyRSI[1] > RsiOverBought RsiMin = MyRSI > MyRSI[1] and MyRSI[1] < MyRSI[2] and MyRSI[1] < RsiOverSold if RsiMax then RSIMax1 = MyRSI[1] High1 = High[1] for I = MinBarRange to 80 if RsiMax[I] then RSIMax2 = MyRSI[I + 1] High2 = High[I + 1] If High1 > High2 and RSIMax1 < RSIMax2 then DRAWARROWDOWN(barindex, High + Rge1) coloured(255,192,203,255) DRAWTEXT("MFI", barindex, High + Rge2, SansSerif,Italic,10)coloured(0,0,255,255) //aha //elsif High1 < High2 and RSIMax1 > RSIMax2 then //DRAWARROWDOWN(barindex, High + Rge1) coloured(255,192,203,255) //DRAWTEXT("MFI", barindex, High + Rge2, SansSerif,Italic,10)coloured(0,0,255,255) endif break endif next endif return Wir haben nun also die Short-Signale mit “DrawArrowDown” dem MFI Das kann man fortsetzen für andere (gute) Divergenzindikatoren wie Momentum, PVT, SMI, … Soweit so gut. ………………………………….. Ersetze ich jetzt das “DrawArrowDown” mit Sellshort, füge SL und TP und schreibe den Indikator etwas um, erhalte ich eine Strategie, die sieht dann so aus RsiOverSold = 40 RsiOverBought = 60 MinBarRange = 3 MyRSI = RSI[14](close) RsiMax = MyRSI < MyRSI[1] and MyRSI[1] > MyRSI[2] and MyRSI[1] > RsiOverBought RsiMin = MyRSI > MyRSI[1] and MyRSI[1] < MyRSI[2] and MyRSI[1] < RsiOverSold if RsiMax then RSIMax1 = MyRSI[1] High1 = High[1] for I = MinBarRange to 80 if RsiMax[I] then RSIMax2 = MyRSI[I + 1] High2 = High[I + 1] If High1 > High2 and RSIMax1 < RSIMax2 then sellshort at market endif break endif next endif set stop ploss 15 set target pprofit 15 Das gleiche kann ich mit den anderen Indikatoren Momentum, PVT, SMI, … machen. ………………………………….. Nun kommt meine eigentliche Frage. Es können 1,2,3,4… “DrawArrowDown” gleichzeitg über einer Kerze oder auch über mehrere Kerzen hintereinander auftreten. So entstehen dann 1,2,3,4… Shortsignale. Ich möchte nun 1. einen Short eröffnen, wenn z.B. 3 von 4 Shortsignalen über die letzten n-Kerzen aufgetreten sind, es können auch die gleichen Shortsignale sein, siehe Screenshot1 und ich möchte alternativ 2. Longs eröffnen wenn z.B. 3 von 4 shortsignale über die letzten n-Kerzen aufgetreten sind, es können auch wieder die gleichen Shortsignale sein, siehe Screenshot2 Wie würde dafür der der Code aussehen…? ………………………………. Habe ich es gut erklären können? Habt Ihr Fragen?