MT4软件---001-1副图源码指标多空震荡辅助
想要找一些外汇MT4的指标,附有源码,交易的时候可以辅助,编写指标的时候可以参考学习,想改善的时候,可以编辑。
指标
(如果图片显示不出来,请移步微信公众号:智能云策略)
灰色:震荡
绿色:多头
红色:空头
紫线为0轴。
源码
#property copyright "弱水三千.艾云策略"
#property link "https://www.aiycl.cn"
#property description "作者微信/QQ:289876878"
#property description "出租/搭建AI机器人,群智能提醒服务"
#property description "若需定制其他EA/指标功能,请联系作者!"
#property version "1.00"
#property link "https://www.aiycl.cn"
#property indicator_separate_window
#property indicator_buffers 8
#property indicator_levelcolor MediumOrchid
//
//
//
//
//
#define version "v1.0.3.1"
#define EPSILON 0.00000001
#define CURRENCYCOUNT 8
//
//
//
//
//
extern int BARS = 500;
extern string gen = "----General inputs----";
extern bool autoSymbols = false;
extern string symbolsToWeigh = "GBPNZD,EURNZD,GBPAUD,GBPCAD,GBPJPY,GBPCHF,CADJPY,EURCAD,EURAUD,USDCHF,GBPUSD,EURJPY,NZDJPY,AUDCHF,AUDJPY,USDJPY,EURUSD,NZDCHF,CADCHF,AUDNZD,NZDUSD,CHFJPY,AUDCAD,USDCAD,NZDCAD,AUDUSD,EURCHF,EURGBP";
extern string nonPropFont = "Lucida Console";
extern bool showOnlySymbolOnChart = true;
extern string ind = "----Indicator inputs----";
extern double HalfLength = 20;
extern int Price = PRICE_WEIGHTED;
extern bool autoTimeFrame = true;
extern string ind_tf = "timeFrame M1,M5,M15,M30,H1,H4,D1,W1,MN";
extern string timeFrame = "D1";
extern bool ignoreFuture = false;
extern bool showCrossAlerts = true;
extern double diffThreshold = 0.8;
extern string cur = "----Currency inputs----";
extern bool USD = true;
extern bool EUR = true;
extern bool GBP = true;
extern bool CHF = true;
extern bool JPY = true;
extern bool AUD = true;
extern bool CAD = true;
extern bool NZD = true;
extern string col = "----Color inputs----";
extern color Color_USD = clrGreen;
extern color Color_EUR = clrDeepSkyBlue;
extern color Color_GBP = clrRed;
extern color Color_CHF = clrChocolate;
extern color Color_JPY = clrFireBrick;
extern color Color_AUD = clrDarkOrange;
extern color Color_CAD = clrPurple;
extern color Color_NZD = clrTeal;
extern color colorWeakCross = clrOrangeRed;
extern color colorNormalCross = clrGold;
extern color colorStrongCross = clrLimeGreen;
extern color colorDiffUp = clrLimeGreen;
extern color colorDiffDn = clrRed;
extern color colorDiffLo = clrGray;
extern int Line_Thickness = 2;
//
//
//
//
//
string indicatorName = "CurrencySlopeStrength";
string shortName;
int userTimeFrame;
string almostUniqueIndex;
//
//
//
//
//
double arrUSD[];
double arrEUR[];
double arrGBP[];
double arrCHF[];
double arrJPY[];
double arrAUD[];
double arrCAD[];
double arrNZD[];
//
//
//
//
//
int symbolCount;
string symbolNames[];
string currencyNames[CURRENCYCOUNT] = { "USD", "EUR", "GBP", "CHF", "JPY", "AUD", "CAD", "NZD" };
double currencyValues[CURRENCYCOUNT]; // Currency slope strength
double currencyValuesPrior[CURRENCYCOUNT]; // Currency slope strength prior bar
double currencyOccurrences[CURRENCYCOUNT]; // Holds the number of occurrences of each currency in symbols
color currencyColors[CURRENCYCOUNT];
//
//
//
//
//
int verticalShift = 14;
int verticalOffset = 30;
int horizontalShift = 100;
int horizontalOffset = 10;
后面的源码,请移步微信公众号:“智能云策略”获取。
分享链接: