"CRT Indcator" 标识
指标
216 下载
版本 1.0, Oct 2025
Windows 版、Mac 版
"CRT Indcator" 已上传图片
22.22M
交易量
37.49K
盈利点数
45
销售
2.24K
免费安装

创建了一个使用 CRTIndicator 来设置止损和止盈水平的 cBot。
这个想法是使用前一个蜡烛(由 CandleIndex 指定)的 CRT 水平(高、中、低)来为新交易设置止损和止盈。

步骤:

  1. 我们将创建一个 cBot,根据某些条件(我们将定义为测试参数)打开交易(买入或卖出)。
  2. 我们将使用 CRTIndicator 获取前一个蜡烛的水平(蜡烛索引由用户设置)。
  3. 对于买入交易,我们将在参考蜡烛的 CRT 低点设置止损,在 CRT 高点设置止盈。
  4. 对于卖出交易,我们将在参考蜡烛的 CRT 高点设置止损,在 CRT 低点设置止盈。

但是,请注意我们拥有的 CRTIndicator 仅计算每根蜡烛的水平并绘制它们。
我们需要从 cBot 访问该指标,并获取我们感兴趣的特定蜡烛的值。

让我们设计这个 cBot:

参数:

  • CandleIndex:使用哪根之前的蜡烛(0 = 当前,1 = 前一个,依此类推)
  • TradeType:我们可以设置一个参数来选择买入或卖出以进行测试,或者使用信号(如移动平均交叉)来决定。
    为简单起见,我们设置一个参数来选择交易类型。

但请注意:在实盘交易中,我们会使用一些条件来入场。我们将制作一个简单的 cBot,如果当前没有持仓,则在当前蜡烛打开交易。

我们假设交易的时间框架是图表的时间框架。

cBot 中的步骤:

  1. 检查是否有持仓。如果没有,则考虑开仓。
  2. 获取指定 CandleIndex 的 CRTIndicator 值(相对于当前的过去蜡烛)。
  3. 对于买入交易:
    止损 = 参考蜡烛的 CRT 低点
    止盈 = 参考蜡烛的 CRT 高点
  4. 对于卖出交易:
    止损 = 参考蜡烛的 CRT 高点
    止盈 = 参考蜡烛的 CRT 低点

但是,请注意指标是为每个索引计算的。我们为每个索引绘制相同的值(因为我们使用了固定的 CandleIndex 偏移)。
但在 cBot 中,我们想要获取指标在当前时间(最近完成的蜡烛)对应指定 CandleIndex 的水平。

重要:指标的 Calculate 方法为每个索引调用,并在当前索引存储参考蜡烛(索引 - CandleIndex)的值。
所以如果我们想获取特定历史蜡烛的 CRT 水平,我们可以简单地读取该蜡烛索引处指标的输出序列?
但请注意:指标输出与当前索引对齐。实际上,指标为每根柱绘制相同的值,因为我们设置了:
CRTHigh[index] = crtHigh; // crtHigh 是 (index - CandleIndex) 蜡烛的高点

所以如果我们在索引 100 且 CandleIndex=1,那么我们获取的是索引 99 的高点,并将其绘制在索引 100。

这意味着如果我们想要 CandleIndex 根蜡烛之前的 CRT 水平,我们可以在当前柱(索引)获取指标输出,这将给我们 CandleIndex 根蜡烛之前的水平。

但是等等,在 cBot 中,我们将运行 OnBar 或 OnTick。我们关注的是最近完成的柱(索引 = MarketSeries.Close.Count - 2),而我们想要的蜡烛是(当前索引 - CandleIndex)。

或者,我们可以更改指标,使其在与参考蜡烛相同的索引输出水平,但那样我们必须将绘图向后移动 CandleIndex。

然而,当前指标设计为从前一个柱绘制当前柱的水平。所以如果设置 CandleIndex=1,那么每根柱绘制的是前一个柱的水平。

我们如何在 cBot 中使用它:

我们将把指标添加到 cBot,然后获取最近柱的值(索引 = MarketSeries.Close.Count - 1),这将给我们 CandleIndex 根柱之前的水平。

示例:
当前柱索引 = 最后一根柱(索引 = MarketSeries.Close.Count - 1)
那么该索引处的指标输出(CRTHigh[MarketSeries.Close.Count-1])是(当前索引 - CandleIndex)柱的高点。

但请注意:指标的 Calculate 方法为每个历史柱和每个新柱调用。因此最后一根柱的输出序列将有我们想要的值。

让我们编写 cBot 代码:

我们将有以下参数:
[Parameter("Candle Index", DefaultValue = 1, MinValue = 0)]
public int CandleIndex { get; set; }

[Parameter("Trade Type", DefaultValue = TradeType.Buy)]
public TradeType SelectedTradeType { get; set; }

[Parameter("Volume (Lots)", DefaultValue = 1, MinValue = 0.01, Step = 0.01)]
public double Volume { get; set; }

我们还将创建一个 CRTIndicator 的实例。

OnBar 中的步骤:
如果没有持仓,则根据指标输出为当前柱(对应 CandleIndex 根柱之前的水平)设置止损和止盈并开仓。

但是,请注意:指标当前柱(最后一根柱)的输出设置为(当前柱索引 - CandleIndex)的水平。但当我们处于最开始时,必须确保有足够的柱。

指标配置
0.0
评价:0
客户评价
该产品尚无评价。已经试过了?抢先告诉其他人!
Signal
Indices
Commodities
GBPUSD
RSI
Bollinger
Fibonacci
Scalping
AI
XAUUSD
NAS100
MACD
BTCUSD
Forex
Breakout
EURUSD
NZDUSD
Martingale
Prop
ZigZag
Supertrend
Fair Value Gap
SMC
Crypto
Grid
Stocks
ATR
USDJPY
VWAP
cTrader Store 提供的所有产品,包括交易机器人、指标和插件,均由第三方开发者提供,仅供信息参考和技术访问之用。cTrader Store 并非经纪商,不提供投资建议、个人推荐或任何未来业绩保证。

该作者的其他作品

cBot
ATR
RSI
+3
GoldScalperPro is a high-speed automated trading bot designed for precision scalping on gold (XAUUSD).
cBot
AI
RSI
+8
ORB cBot: Comprehensive Opening Range Breakout Strategy for XAU/USD
指标
SMC
Forex
+9
Automatically identify and visualize Fair Value Gaps (FVGs) with entry zones, fill tracking, and customizable alerts.
cBot
AI
ATR
+19
cBot with a fully functional ATR-based trailing stop system and an optional trailing step filter for smoother adjustment
cBot
AI
Prop
+5
Golden Trap Model - cTrader cBot
cBot
AI
ATR
+5
Ai_ScalperPro Max is a sophisticated automated trading robot designed specifically for gold (XAUUSD) trading
100%
投资 回报率
2.44
盈利系数
25.93%
最大回撤
指标
AI
ATR
+15
Engulfing Candle Indicator Pro
cBot
AI
ATR
+8
ORB Smart Money Bot for XAUUSD is a sophisticated algorithmic trading system specifically optimized for Gold (XAUUSD).
指标
ATR
SMC
+2
HTF POWER 3 ICT Power of 3 · M1 Precision · H4 Intelligence Auto-detect Accumulation → Manipulation → Distribution
cBot
MACD
Forex
+5
CRT Trading_bot
100%
投资 回报率
2.13
盈利系数
23.59%
最大回撤
cBot
ATR
XAUUSD
+1
XAUUSD Engulfing Master - Professional Trading Bot
41.3%
投资 回报率
1.85
盈利系数
41.98%
最大回撤
cBot
Forex
NAS100
+5
Session-based trading bot with intelligent trailing stops. Captures Asia range, trades London/NY breakouts
8.86
盈利系数
5.21%
最大回撤

猜您喜欢

指标
ATR
Key Levels
+1
key trading price indicator!
指标
Prop
Forex
+11
⚡Nebula Range Filter is a professional trend filter indicator for cTrader⚡
指标
ATR
SMC
+15
VmmSignalAverage PRO Trial - Professional Pattern Detection Indicator.
指标
Forex
Signal
+1
Swing Flow is an advanced trend-following indicator that displays directly on the price chart
指标
MultiTF Pivot and SR Indicator
指标
Forex
Real-Time Candlestick Pattern Detection with Custom Alerts & Trend Analysis for cTrader
指标
RSI
Forex
+6
🚀 QQEX Trinity Indicator - The Ultimate Trading Filter 🚀
指标
RSI
Volume
+5
Multi-mode signal indicator with 3 filters, real-time bar-close detection, no repainting, and full alert system.
指标
ATR
RSI
+11
This indicator puts three helpful trading tools on your chart at once. Think of it like having three expert traders
指标
AI
Signal
+1
🔥 THIS BURNS JP225 INDICATOR – Professional Trading Signals
指标
Prop
Forex
+4
Price Action Zone shows previous D/W/M key levels to help frame intraday price action, liquidity, and market structure.
指标
ATR
RSI
+3
🚀 Specialized algorithm is designed to confirm entry and exit points with precision 🎯
指标
[Hamster-Coder] Pivot Points (Multi Time Frame)
指标
SMC
Prop
+11
MarketStructurePro – Smart BOS/CHoCH
指标
ATR
VWAP
+2
Volume-Weighted Trend System that combines VWMA with ATR for volatility filtering.
指标
SMC
Prop
+11
Sessions PRO is a professional session visualization indicator - 4 Fully Customizable Sessions
指标
EMA
MACD
+5
Multi-timeframe MACD with color-changing line, 4-color histogram & triangle signals.
指标
ADX
ATR
+5
Precision Sniper by PrimeQuant: Advanced confluence engine with auto-presets, dynamic TP/SL, and live backtest stats.
22.22M
交易量
37.49K
盈利点数
45
销售
2.24K
免费安装