"Doji Engulf" โลโก้
อินดิเคเตอร์
3 ดาวน์โหลด
เวอร์ชัน 1.0, Jul 2025
Windows, Mac
3
ติดตั้งฟรี

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("ขนาดโดจิ", DefaultValue = 0.05, MinValue = 0.01, Step = 0.01)]

public double DojiSize { get; set; }


[Parameter("อัตราส่วนแท่งเทียนยาว", DefaultValue = 0.7, MaxValue = 1, Step = 0.1)]

public double LongCandleRatio { get; set; }


[Parameter("ใช้ตัวกรองปริมาณ?", DefaultValue = false)]

public bool UseVolumeFilter { get; set; }


[Parameter("ช่วงค่าเฉลี่ยเคลื่อนที่ของปริมาณ", DefaultValue = 24)]

public int VolumeMA { get; set; }


[Parameter("ช่วง RSI", DefaultValue = 14)]

public int RSIPeriod { get; set; }


[Parameter("อัตราส่วนไส้เทียนต่อแท่งเทียน", DefaultValue = 2.5, MinValue = 1.0, Step = 0.1)]

public double WickToBodyRatio { get; set; }


private MovingAverage volumeMA;

private RelativeStrengthIndex rsi;


[Output("สัญญาณโดจิ", 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]; // ทำเครื่องหมายโดจิบนกราฟ

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


// เน้นจุดสูงสุดและต่ำสุดของแท่งโดจิด้วยเส้นทึบที่ยาวไปยังแท่งเทียนถัดไป 3 แท่ง

HighlightDojiHighLow(index, timeFrameNumber, label);

}


// การตรวจจับความแตกต่าง SMT ถูกนำไปใช้กับทุกช่วงเวลา

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];


// วาดเส้นแนวนอนทึบที่จุดสูงสุดและต่ำสุดของแท่งโดจิที่ยาวไปยังแท่งเทียนถัดไป 3 แท่ง

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;


// เพิ่มหมายเลขช่วงเวลาหรือข้อความป้ายถัดจากเส้นสีน้ำเงิน

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

}


private void DetectSMTDivergence(int index)

{

// ตรวจสอบว่าจุดสูงสุดหรือต่ำสุดปัจจุบันสร้างความแตกต่างกับ 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)

{

// ความแตกต่างแบบหมี: ราคาทำจุดสูงสุดใหม่สูงกว่าเดิม, RSI ทำจุดสูงสุดใหม่ต่ำกว่าเดิม

if (currentHigh > prevHigh && currentRSI < prevRSI)

{

// ทำเครื่องหมายความแตกต่างบนกราฟด้วยตัวระบุเฉพาะสำหรับช่วงเวลานี้

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

}


// ความแตกต่างแบบกระทิง: ราคาทำจุดต่ำสุดใหม่ต่ำกว่าเดิม, RSI ทำจุดต่ำสุดใหม่สูงกว่าเดิม

if (currentLow < prevLow && currentRSI > prevRSI)

{

// ทำเครื่องหมายความแตกต่างบนกราฟด้วยตัวระบุเฉพาะสำหรับช่วงเวลานี้

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;


// กำหนดว่าแท่งเทียนปัจจุบันมีตัวแท่งเล็กและไส้เทียนยาวหรือไม่

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

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


// กำหนดว่าแท่งเทียนก่อนหน้ามีตัวแท่งเล็กและไส้เทียนยาวหรือไม่

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

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


return currentHasLongWicks || prevHasLongWicks;

}

}

}

โปรไฟล์อินดิเคเตอร์
0.0
รีวิว: 0
รีวิวจากลูกค้า
ยังไม่มีรีวิวสำหรับผลิตภัณฑ์นี้ หากเคยลองแล้ว ขอเชิญมาเป็นคนแรกที่บอกคนอื่น!
ผลิตภัณฑ์ที่มีให้บริการผ่าน cTrader Store รวมถึงบอทการเทรด อินดิเคเตอร์ และปลั๊กอิน มีให้บริการโดยนักพัฒนาบุคคลที่สามและมีไว้เพื่อวัตถุประสงค์ในการเข้าถึงข้อมูลและทางเทคนิคเท่านั้น cTrader Store ไม่ใช่โบรกเกอร์และไม่ได้ให้คำแนะนำการลงทุน คำแนะนำส่วนบุคคล หรือการรับประกันผลการดำเนินงานในอนาคต

เพิ่มเติมจากผู้เขียนคนนี้

อินดิเคเตอร์
The Session Golden Hours indicator is designed for serious traders looking to visualize high-probability

นอกจากนี้คุณยังอาจชอบ

"LIQUIDITY POOL SIGNAL PRO" โลโก้
ยอดนิยม
4.0
(3)
$39
/
$50
อินดิเคเตอร์
Forex
BTCUSD
+5
INDICATOR,LIQUIDITY POOLS,ACCURATE SIGNAL, NO DELAY,80% PROBABILITY
อินดิเคเตอร์
ATR
Volume
+1
The UT Bot identify potential trend reversals and momentum shifts.
อินดิเคเตอร์
RSI
MACD
+7
The ZigZag indicator is a technical analysis tool primarily used to identify key price reversal points.
อินดิเคเตอร์
ATR
Volume
+2
Heatmap Liquidity Zones Visualize volume-at-price, uncover hidden support/resistance, and track market liquidity in real
อินดิเคเตอร์
ATR
RSI
+16
Multi-timeframe trend indicator using EMA, MACD & ADX to confirm high-probability buy and sell bias.
อินดิเคเตอร์
Prop
Forex
+5
Higher TimeFrame Candle Tracker: Current Timeframe (Any TimeFrame) Show High TimeFrame Candle Bar
อินดิเคเตอร์
ATR
Forex
+1
Trade fearlessly: auto-adjusts order blocks, manages risks, and ensures precision. Free for early users.
อินดิเคเตอร์
Custom your Renko Brick how do you wish!
อินดิเคเตอร์
Prop
Forex
+2
Vision - Advanced Session Indicator
อินดิเคเตอร์
Grid
Prop
+18
Volumen Delta", es una representación visual del flujo de órdenes basada en el volumen de transacciones.
อินดิเคเตอร์
RSI
Signal
+2
Dynamic circles visualize price's volatility position. Like RSI for market overextension & stretch. Quantify context.
อินดิเคเตอร์
ATR
Prop
+14
Optimize exits with Chandelier Exit! Visualize stop-loss points dynamically for improved trading precision and safety.
อินดิเคเตอร์
A simple indicator that tracks the value of your open trades in pips.
อินดิเคเตอร์
Volume
Order Block
+1
Elevate your market analysis with the Aggression Delta Volume Profile, a premium, institutional-grade order flow utility
"Pro Sniper_Algotrend" โลโก้
ยอดนิยม
4.0
(1)
$19
/
$38
อินดิเคเตอร์
ADX
ATR
+5
10 Factors. One Signal. Zero Guesswork.
"IR Candle MTF" โลโก้
เรตติ้งสูง
4.6
(5)
ฟรี
อินดิเคเตอร์
with this indicator you could see other time frame candle in your chart.
อินดิเคเตอร์
Market Structure
Support & Resistance
Auto-centers price when it moves beyond threshold. Adjustable zoom. Works on any chart type. Never lose price again.
อินดิเคเตอร์
Grid
Prop
+14
Visualize trends with Standard Deviation Channel! Display median, and add customizable upper/lower deviation channels.
3
ติดตั้งฟรี