ForexProfitBoost_2nb_HTF_Signal 指标可帮助交易者识别趋势方向或由 ForexProfitBoost_2nbSign 指标生成的信号。该指标以图形对象的形式展现,配有颜色标识的趋势指示或交易方向,并能够触发警报和播放音频信号。
如果所选柱的趋势持续,指标将显示一个右箭头,其颜色与趋势方向相符。如果在所选柱上趋势发生变化,指标将显示一个对角箭头,其颜色和方向将对应交易方向。
所有输入参数可以分为三个大类:
- ForexProfitBoost_2nb 输入参数:
input string Symbol_=""; // 金融资产 input ENUM_TIMEFRAMES Timeframe=PERIOD_H6; // 指标计算的时间框架 //---- 移动平均 1 参数 input uint MAPeriod1=7; input ENUM_MA_METHOD MAType1=MODE_EMA; input ENUM_APPLIED_PRICE MAPrice1=PRICE_CLOSE; //---- 移动平均 2 参数 input uint MAPeriod2=21; input ENUM_MA_METHOD MAType2=MODE_SMA; input ENUM_APPLIED_PRICE MAPrice2=PRICE_CLOSE;
- ForexProfitBoost_2nb_HTF_Signal 指标可视化所需的输入参数:
//---- 指标可视化设置 input uint SignalBar=0; // 获取信号的柱号(0为当前柱) input string Symbols_Sirname=INDICATOR_NAME"_Label_"; // 指标标签名称 input color Upsymbol_Color=clrBlueViolet; // 上升趋势符号颜色 input color Dnsymbol_Color=clrMagenta; // 下降趋势符号颜色 input color IndName_Color=clrDarkOrchid // 指标名称颜色 input uint Symbols_Size=60 // 信号符号大小 input uint Font_Size=10 // 指标名称字体大小 input int X_1=5 // 水平名称偏移 input int Y_1=-15 // 垂直名称偏移 input bool ShowIndName=true // 显示指标名称 input ENUM_BASE_CORNER WhatCorner=CORNER_RIGHT_UPPER; // 显示符号的角落 input uint X_=0 // 水平偏移 input uint Y_=20 // 垂直偏移
- ForexProfitBoost_2nb_HTF_Signal 指标触发警报和音频信号所需的输入参数:
//---- 警报设置 input ENUM_ALERT_MODE alert_mode=OnlySound; // 触发指示的选项 input uint AlertCount=0 // 警报次数
如果在同一图表上使用多个 ForexProfitBoost_2nb_HTF_Signal 指标,每个指标都应具有独立的 Symbols_Sirname(指标标签名称)字符串变量值。
该指标需要编译后的指标文件 ForexProfitBoost_2nbSign.mq5。将其放入 <terminal_data_folder>\MQL5\Indicators\。

图1. ForexProfitBoost_2nb_HTF_Signal 指标。趋势持续信号

图2. ForexProfitBoost_2nb_HTF_Signal 指标。交易信号