Trading product for Doji Engulf Indicateur, image 1
Indicateur
3 téléchargements
Version 1.0, Jul 2025
Windows, Mac
3
Installations gratuites

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;

}

}

}

Profil de l'indicateur
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 !
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
Key Levels
Liquidity Grab
+3
Visual market context dashboard showing bias states, CE positioning, session status and sweep context.
Indicateur
The Multi-Timeframe Candle Indicator displays candles from multiple timeframes in one window, enhancing market analysis!
Indicateur
ATR
BOS
+5
Heat intensity mapping of structural participation. See where price fights, where it accepts, and where it rejects .
Indicateur
Forex
BTCUSD
+10
Enhance trading with TSI! Use the True Strength Index for clear insights into market momentum and trend strength.
Indicateur
Forex
Version 3: Full control of session display including start and end times of all 3 sessions!
Indicateur
MACD
Forex
+2
a revolutionary indicator that integrates volume into MACD.
Indicateur
XAUUSD
Commodities
A Fair Value Gap (FVG) indicator that identifies potential price imbalances, potential reversal and continuation zones
Indicateur
RSI
MACD
This indicator is a combination of MACD and RSI into one. This is perfect fusion and powerful indicator ever.
Indicateur
Forex
Crypto
Bar Close Alert Manager provides real-time alerts for bar closures with customizable notifications and automation.
Indicateur
RSI
Forex
+2
Candle Pro, Perfect for scalping, intraday, and swing trading.
Indicateur
ATR
RSI
+13
technical analysis tool designed to provide traders with a structured view of market momentum and volatility
Indicateur
Signal
Breakout
+1
Bolliger Bands + Hamster-Coder™ Timeframe Decoupling
Indicateur
Prop
VWAP
+15
VWAP: Follow the smart money. Trade with real volume and the fair price on your side!
Indicateur
ADX
ATR
+2
Quantum Breakout Pro Professional Breakout Indicator for cTrader
Indicateur
Order Block
Fair Value Gap
+3
This indicator scans multi-timeframe trend confluence and price action triggers within key supply/demand zones
Indicateur
ATR
RSI
+6
💹 Define a price channel 📈 and determine trend direction (bullish 🟢 or bearish 🔴).
Indicateur
ATR
RSI
+13
The TrendFibonacci indicator is a powerful tool for traders, combining Fibonacci retracement levels
Indicateur
BOS
Imbalance
+4
Automatically detects and highlights both Bullish and Bearish Fair Value Gaps (FVGs).
3
Installations gratuites