CandleFormation
Click the file above to Download.
NOTE: For easy import into your charts, save to some where that you will be able to remember, for example your computer's desktop. Be sure to save using .alt as the file extension.
Copy to Clipboard Local minPrev Local minFinal Local MaxPrev Local MaxFinal Local DecisionCoeff = 0.7 Local TimesPrev = 0.2 Local TimesPrePrev = 0.8 IF (open[1] < close[1]) THEN minPrev = open[1] ELSE minPrev = close[1] ENDIF IF (close[2] < minPrev ) THEN minFinal = close[2] ELSE minFinal = minPrev ENDIF // BUY - morning star IF close[0] > open[0] AND close[0] - open[0] >= (high[0] - low[0]) * DecisionCoeff AND Abs(close[1] - open[1]) < (high[1] - low[1]) * DecisionCoeff AND Abs(close[1] - open[1]) <= (close[0] - open[0]) * TimesPrev AND close[2] < open[2] AND open[2] - close[2] > (high[2] - low[2]) * DecisionCoeff AND Abs(close[0] - minPrev) >= Abs(open[2] - minFinal) * TimesPrePrev THEN AddBuyEntry ENDIF IF (open[1] > close[1]) THEN MaxPrev = open[1] ELSE MaxPrev = close[1] ENDIF IF (close[2] > MaxPrev ) THEN MaxFinal = close[2] ELSE MaxFinal = MaxPrev ENDIF // Sell Evening Star IF close[0] < open[0] AND open[0] - close[0] >= (high[0] - low[0]) * DecisionCoeff AND Abs(close[1] - open[1]) < (high[1] - low[1]) * DecisionCoeff AND Abs(close[1] - open[1]) <= (open[0] - close[0]) * TimesPrev AND close[2] > open[2] AND close[2] - open[2] > (high[2] - low[2]) * DecisionCoeff AND Abs(close[0] - maxPrev) >= Abs(open[2] - maxFinal) * TimesPrePrev THEN AddSellEntry ENDIF
Enlarge Chart