[MT4指标]大周期高低点指示
主图指标
大周期高低点指示
能在小周期上面显示出大周期的高低点
mt4指标类型:震荡指标
是否能用在mt4手机版上:否
是否含有未来函数:无
可以用在韬客外汇返佣网的平台上
//+------------------------------------------------------------------+
//| Lines_HiLo_Periodical.mq4 |
//|
//|
//+------------------------------------------------------------------+
#property copyright "TradeForex"
#property link ""
#property indicator_chart_window
//extern int Lookback_Period = 1
extern int Days_into_Curr_Week = 1;
extern int Days_into_Curr_Mnth = 1;
extern int Days_into_Curr_Year = 109;
extern int _Days_into_Curr_Year_To_May31_ = 109;
extern int No_of_Days_in_Prev_Wk = 5;
extern int Days_in_Prev_Month = 23;
extern int Days_in_Prev_Year = 245;
//int DayOfYear();
//double Curr_Yr_Daily_Bars_To_Today = 0;
double Daily_Period_Low=0;
double Daily_Period_High=0;
double Daily_Period_Low_Line;
double Daily_Period_High_Line;
double Curr_Wk_Period_High = 0;
double Curr_Wk_Period_Low = 0;
double Prev_Wk_Period_High = 0;
double Prev_Wk_Period_Low = 0;
double Curr_Wk_Period_High_Line;
double Curr_Wk_Period_Low_Line;
double Prev_Wk_Period_High_Line;
double Prev_Wk_Period_Low_Line;
double Curr_Month_Period_Low=0;
double Curr_Month_Period_High=0;
double Curr_Month_Period_Low_Line;
double Curr_Month_Period_High_Line;
double Prev_Month_Period_Low=0;
double Prev_Month_Period_High=0;
double Prev_Month_Period_Low_Line;
double Prev_Month_Period_High_Line;
double Curr_Year_Period_Low=0;
double Curr_Year_Period_High=0;
double Curr_Year_Period_Low_Line;
double Curr_Year_Period_High_Line;
double Prev_Year_Period_Low=0;
double Prev_Year_Period_High=0;
double Prev_Year_Period_Low_Line;
double Prev_Year_Period_High_Line;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
return(0);
}
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
Daily_Period_High =High[Highest(NULL,0,MODE_HIGH,1,1)];
Daily_Period_Low =Low[Lowest(NULL,0,MODE_LOW,1,1)];
Daily_Period_Low_Line = (Daily_Period_Low );
Daily_Period_High_Line = (Daily_Period_High );
Curr_Wk_Period_High =High[Highest(NULL,0,MODE_HIGH,Days_into_Curr_Week,0 )];
Curr_Wk_Period_Low =Low[Lowest(NULL,0,MODE_LOW,Days_into_Curr_Week,0 )];
Prev_Wk_Period_High =High[Highest(NULL,0,MODE_HIGH,No_of_Days_in_Prev_Wk,Days_into_Curr_Week)];
Prev_Wk_Period_Low =Low[Lowest(NULL,0,MODE_LOW,No_of_Days_in_Prev_Wk,Days_into_Curr_Week)];
Curr_Wk_Period_High_Line = (Curr_Wk_Period_High );
Curr_Wk_Period_Low_Line = (Curr_Wk_Period_Low );
Prev_Wk_Period_High_Line = (Prev_Wk_Period_High );
Prev_Wk_Period_Low_Line = (Prev_Wk_Period_Low );
Curr_Month_Period_High =High[Highest(NULL,0,MODE_HIGH,Days_into_Curr_Mnth,0)];
Curr_Month_Period_Low =Low[Lowest(NULL,0,MODE_LOW,Days_into_Curr_Mnth,0)];
Curr_Month_Period_Low_Line = (Curr_Month_Period_Low );
Curr_Month_Period_High_Line = (Curr_Month_Period_High );
Prev_Month_Period_High =High[Highest(NULL,0,MODE_HIGH,Days_in_Prev_Month,Days_into_Curr_Mnth)];
Prev_Month_Period_Low =Low[Lowest(NULL,0,MODE_LOW,Days_in_Prev_Month,Days_into_Curr_Mnth)];
Prev_Month_Period_Low_Line = (Prev_Month_Period_Low );
Prev_Month_Period_High_Line = (Prev_Month_Period_High );
Curr_Year_Period_High =High[Highest(NULL,0,MODE_HIGH,Days_into_Curr_Year,0)];
Curr_Year_Period_Low =Low[Lowest(NULL,0,MODE_LOW,Days_into_Curr_Year,0)];
Curr_Year_Period_Low_Line = (Curr_Year_Period_Low );
Curr_Year_Period_High_Line = (Curr_Year_Period_High );
Prev_Year_Period_High =High[Highest(NULL,0,MODE_HIGH,Days_in_Prev_Year,Days_into_Curr_Year)];
Prev_Year_Period_Low =Low[Lowest(NULL,0,MODE_LOW,Days_in_Prev_Year,Days_into_Curr_Year)];
Prev_Year_Period_Low_Line = (Prev_Year_Period_Low );
Prev_Year_Period_High_Line = (Prev_Year_Period_High );
{
SetLevel("Current Week High", Curr_Wk_Period_High_Line, Salmon); //Green
SetLevel("Current Week Low", Curr_Wk_Period_Low_Line , Salmon); //G
SetLevel("Previous Week High", Prev_Wk_Period_High_Line, LightSalmon); //Green
SetLevel("Previous Week Low", Prev_Wk_Period_Low_Line, LightSalmon); //G
SetLevel("Current Months High", Curr_Month_Period_High_Line, Green); //Green
SetLevel("Current Months Low", Curr_Month_Period_Low_Line, Green); //G
SetLevel("Previous Months High", Prev_Month_Period_High_Line, LightGreen); //Green
SetLevel("Previous Months Low", Prev_Month_Period_Low_Line, LightGreen); //G
SetLevel("Current Year High", Curr_Year_Period_High_Line, Gold); //Green
SetLevel("Current Year Low", Curr_Year_Period_Low_Line, Gold); //G
SetLevel("Previous Year High", Prev_Year_Period_High_Line, Beige); //Green
SetLevel("Previous Year Low", Prev_Year_Period_Low_Line, Beige); //G
SetLevel("Yesterdays High", Daily_Period_High_Line, Blue); //Blue
SetLevel("Yesterdays Low", Daily_Period_Low_Line, Blue); //Blue
}
return(0);
}
void SetLevel(string text, double level, color col1)
{
string labelname= text + " Label";
string linename= text + " Line";
if (ObjectFind(labelname) != 0) {
ObjectCreate(labelname, OBJ_TEXT, 0, Time[20], level);
ObjectSetText(labelname, " " + text, 8, "Arial", White);
}
else {
ObjectMove(labelname, 0, Time[20], level);
}
if (ObjectFind(linename) != 0) {
ObjectCreate(linename, OBJ_HLINE, 0, Time[40], level);
ObjectSet(linename, OBJPROP_STYLE, STYLE_SOLID);
ObjectSet(linename,OBJPROP_LEVELWIDTH, 5);
ObjectSet(linename, OBJPROP_COLOR, col1);
}
else {
ObjectMove(linename, 0, Time[40], level);
}
}
Lines%20HiLo_%20Periodical.jpg
发表于:2014-09-28 12:53只看该作者
2楼
桌面桌面
韬客社区www.talkfx.co
发表于:2015-08-03 01:16只看该作者
3楼
沙发,看看先。
韬客社区www.talkfx.co
发表于:2015-08-14 06:00只看该作者
4楼
好东西 !!!
文章转自于韬客外汇论坛www.talkfx.com:http://www.talkfx.com/thread-370180-1-2.html
韬客社区www.talkfx.co
发表于:2015-08-15 09:55只看该作者
5楼
感谢
韬客社区www.talkfx.co
发表于:2016-03-01 15:21只看该作者
6楼
韬客社区www.talkfx.co
发表于:2016-06-11 05:06只看该作者
8楼
这个很好,下载了
韬客社区www.talkfx.co
发表于:2016-06-17 06:16只看该作者
9楼
5666666666666666666666666666666666666666
韬客社区www.talkfx.co
发表于:2016-06-17 06:17只看该作者
10楼
44444445555555555555555555555555555555555555555555
韬客社区www.talkfx.co