Doji Engulf
Indicateur
3 téléchargements
Version 1.0, Jul 2025
Windows, Mac
3
Installations gratuites

Description

using cAlgo.API;

using cAlgo.API.Indicators;

using cAlgo.API.Internals;

using System;


namespace cAlgo.Indicators

{

[Indicator(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]

public class DojiStrategyIndicator : Indicator

{

[Parameter("Taille du Doji", DefaultValue = 0.05, MinValue = 0.01, Step = 0.01)]

public double DojiSize { get; set; }


[Parameter("Ratio de la Bougie Longue", DefaultValue = 0.7, MaxValue = 1, Step = 0.1)]

public double LongCandleRatio { get; set; }


[Parameter("Utiliser le filtre de volume ?", DefaultValue = false)]

public bool UseVolumeFilter { get; set; }


[Parameter("Période de la Moyenne Mobile du Volume", DefaultValue = 24)]

public int VolumeMA { get; set; }


[Parameter("Période du RSI", DefaultValue = 14)]

public int RSIPeriod { get; set; }


[Parameter("Ratio Mèche-Corps", DefaultValue = 2.5, MinValue = 1.0, Step = 0.1)]

public double WickToBodyRatio { get; set; }


private MovingAverage volumeMA;

private RelativeStrengthIndex rsi;


[Output("Signal Doji", Color = Colors.Orange, PlotType = PlotType.Points, Thickness = 2)]

public IndicatorDataSeries DojiSignal { get; set; }


protected override void Initialize()

{

if (UseVolumeFilter)

volumeMA = Indicators.MovingAverage(MarketSeries.TickVolume, VolumeMA, MovingAverageType.Simple);


rsi = Indicators.RelativeStrengthIndex(MarketSeries.Close, RSIPeriod);

}


public override void Calculate(int index)

{

double body = MarketSeries.Close[index] - MarketSeries.Open[index];

double range = MarketSeries.High[index] - MarketSeries.Low[index];

double abody = Math.Abs(body);

double ratio = abody / range;


bool isDoji = abody <= range * DojiSize;

bool goStar = isDoji && (!UseVolumeFilter || MarketSeries.TickVolume[index] > volumeMA.Result[index]);


if (goStar && IsHigherTimeFrame(out int timeFrameNumber, out string label))

{

DojiSignal[index] = MarketSeries.Close[index]; // Marquer le Doji sur le graphique

Chart.DrawIcon("Doji" + TimeFrame.ToString() + index, ChartIconType.Diamond, index, MarketSeries.Close[index], Color.Orange);


// Mettre en évidence le plus haut et le plus bas de la bougie Doji avec des lignes pleines qui s'étendent sur les 3 bougies suivantes

HighlightDojiHighLow(index, timeFrameNumber, label);

}


// La détection de divergence SMT est maintenant appliquée à toutes les périodes

DetectSMTDivergence(index);

}


private bool IsHigherTimeFrame(out int timeFrameNumber, out string label)

{

timeFrameNumber = 0;

label = string.Empty;


if (TimeFrame == TimeFrame.Minute15)

{

timeFrameNumber = 15;

label = "0.25";

return true;

}

else if (TimeFrame == TimeFrame.Minute30)

{

timeFrameNumber = 30;

label = "0.5";

return true;

}

else if (TimeFrame == TimeFrame.Minute45)

{

timeFrameNumber = 45;

label = "0.75";

return true;

}

else if (TimeFrame == TimeFrame.Hour)

{

timeFrameNumber = 1;

label = "1";

return true;

}

else if (TimeFrame == TimeFrame.Hour2)

{

timeFrameNumber = 2;

label = "48";

return true;

}

else if (TimeFrame == TimeFrame.Hour4)

{

timeFrameNumber = 4;

label = "4";

return true;

}

else if (TimeFrame == TimeFrame.Daily)

{

timeFrameNumber = 24;

label = "24";

return true;

}

else if (TimeFrame == TimeFrame.Weekly)

{

timeFrameNumber = 168;

label = "W";

return true;

}

else if (TimeFrame == TimeFrame.Monthly)

{

timeFrameNumber = 720;

label = "M";

return true;

}


return false;

}


private void HighlightDojiHighLow(int dojiIndex, int timeFrameNumber, string label)

{

double dojiHigh = MarketSeries.High[dojiIndex];

double dojiLow = MarketSeries.Low[dojiIndex];


// Dessiner des lignes horizontales pleines au plus haut et au plus bas de la bougie Doji s'étendant sur les 3 bougies suivantes

Chart.DrawTrendLine("DojiHighLine" + TimeFrame.ToString() + dojiIndex, dojiIndex, dojiHigh, dojiIndex + 3, dojiHigh, Color.Blue, 2, LineStyle.Solid).IsInteractive = true;

Chart.DrawTrendLine("DojiLowLine" + TimeFrame.ToString() + dojiIndex, dojiIndex, dojiLow, dojiIndex + 3, dojiLow, Color.Red, 2, LineStyle.Solid).IsInteractive = true;


// Ajouter le numéro de la période ou le texte de l'étiquette à côté de la ligne bleue

Chart.DrawText("TimeFrameHigh" + TimeFrame.ToString() + dojiIndex, label, dojiIndex + 3, dojiHigh, Color.Green).IsInteractive = true;

}


private void DetectSMTDivergence(int index)

{

// Vérifier si le plus haut ou le plus bas actuel forme une divergence avec le RSI

double currentHigh = MarketSeries.High[index];

double currentLow = MarketSeries.Low[index];


double prevHigh = MarketSeries.High[index - 1];

double prevLow = MarketSeries.Low[index - 1];


double currentRSI = rsi.Result[index];

double prevRSI = rsi.Result[index - 1];


bool isWickDivergence = IsWickDivergence(index, currentHigh, currentLow, prevHigh, prevLow);


if (isWickDivergence)

{

// Divergence baissière : le prix fait un plus haut plus élevé, le RSI fait un plus haut plus bas

if (currentHigh > prevHigh && currentRSI < prevRSI)

{

// Marquer la divergence sur le graphique avec un identifiant unique pour cette période

Chart.DrawIcon("BearishDivergence" + TimeFrame.ToString() + index, ChartIconType.DownArrow, index, currentHigh, Color.Red);

}


// Divergence haussière : le prix fait un plus bas plus bas, le RSI fait un plus bas plus élevé

if (currentLow < prevLow && currentRSI > prevRSI)

{

// Marquer la divergence sur le graphique avec un identifiant unique pour cette période

Chart.DrawIcon("BullishDivergence" + TimeFrame.ToString() + index, ChartIconType.UpArrow, index, currentLow, Color.Green);

}

}

}


private bool IsWickDivergence(int index, double currentHigh, double currentLow, double prevHigh, double prevLow)

{

double currentBody = Math.Abs(MarketSeries.Close[index] - MarketSeries.Open[index]);

double currentRange = currentHigh - currentLow;


double prevBody = Math.Abs(MarketSeries.Close[index - 1] - MarketSeries.Open[index - 1]);

double prevRange = prevHigh - prevLow;


// Déterminer si la bougie actuelle a un petit corps et de longues mèches

bool currentHasLongWicks = (currentHigh - MarketSeries.Close[index]) > currentBody * WickToBodyRatio &&

(MarketSeries.Open[index] - currentLow) > currentBody * WickToBodyRatio;


// Déterminer si la bougie précédente a un petit corps et de longues mèches

bool prevHasLongWicks = (prevHigh - MarketSeries.Close[index - 1]) > prevBody * WickToBodyRatio &&

(MarketSeries.Open[index - 1] - prevLow) > prevBody * WickToBodyRatio;


return currentHasLongWicks || prevHasLongWicks;

}

}

}

Résumé

Profil de l'indicateur

Avis clients

0.0
Avis : 0
Avis clients
Il n'y a pas encore d'avis sur ce produit. Vous l'avez déjà essayé ? Soyez le premier à en parler aux autres !

Discussion

Questions fréquentes

Les produits disponibles sur cTrader Store, notamment les bots de trading, les indicateurs et les plug-ins, sont fournis par des développeurs tiers et mis à disposition à titre informatif et à des fins d'accès technique uniquement. cTrader Store n'est pas un courtier et ne fournit aucun conseil en investissement, aucune recommandation personnelle ni aucune garantie quant aux performances futures.

Plus de cet auteur

Indicateur
The Session Golden Hours indicator is designed for serious traders looking to visualize high-probability

Vous pourriez aussi aimer

Indicateur
VWAP
Volume Weighted Average Price (VWAP)
Indicateur
Prop
Forex
+11
😎Read the description before purchasing💩
Indicateur
ATR
SMC
+15
Plot ATR-based SL and 1R/2R/3R TPs instantly for any trade, with clear R-multiple risk mapping.
Indicateur
[Hamster-Coder] Pivot Points (Multi Time Frame)
Indicateur
Key Levels
Market Structure
+1
Sessions, ICT killzones, multi-ORB and previous levels. One clean, no-repaint cTrader overlay.
Indicateur
AI-assisted
Order Block
+5
The daily bias estimator indicator uses ICT concepts to show whether the chart is bullish or bearish on multi-time frame
Indicateur
AI
Forex
+10
Woodie_CCI_pro is an advanced CCI-based toolkit built around the classic Woodie CCI methodology.
Indicateur
Key Levels
Liquidity Sweep
Professional Opening Range Breakout, Initial Balance, False breakout Detection
Indicateur
Master RSI reversals with Parabolic SAR precision! Get real-time alerts for high-probability trend changes.
Indicateur
ATR
Signal
+2
Visual Trend Momentum is a MA/ATR/Volume trend tool. Visual signals for strong trends & reversals. Customizable. 📈📉
Indicateur
Drawdown Monitor
Proprietary trading desk risk monitoring dashboard!
Indicateur
Prop
ZigZag
+5
All-in-One ICT/SMC Institutional Framework — Ranges, Structure, Liquidity, Fibonacci & Time Engine.
Indicateur
ATR
BOS
+5
Full ICT/SMC 4-step setup checker that alerts a long or short setup.
Indicateur
AI
ATR
+27
VolumeProfileSuite is an advanced and flexible Volume Profile indicator for cTrader.
Indicateur
ATR
Channel
+1
Bollinger Bands Advanced Squeeze & Breakout System, Real-Time On-Chart Dashboard, Auto-Squeeze Detector, Dual-Band Cloud
Indicateur
Volume
Supply & Demand
ORDER BOOK TRACKS SMART MONEY IN REAL TIME!
Indicateur
SMC
Prop
+17
Unlock the true intent of market participants with the Classic Proportional Cumulative Volume Delta CVD!
Indicateur
ATR
The Tenkan-ATR Indicator is a powerful and innovative indicator for Traders. SALE OFF!!!

Prix

3
Installations gratuites