[MT4指标]Fibo Pivot Lines GMT指标
主图指标
附图指标,
mt4指标类型:趋势指标
是否能用在mt4手机版上:否
是否含有未来函数:无
http://www.abysse.co.jp/mt4/indicators/Fibo_Pivot_Lines_GMT.mq4//+-------------------------------------------------------------------+
//| Fibo Pivot Lines GMT.mq4 |
//| Copyright ? 2004, MetaQuotes Software Corp. |
//| http://www.metaquotes.net |
//| |
//| Modified by Hossein Paydar |
//| |
//| You are free to use it |
//| |
//| |
//+-------------------------------------------------------------------+
#property copyright "Copyright ? 2005, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net"
#property indicator_chart_window
//---- input parameters
extern int GMTshift=0;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//---- TODO: add your code here
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int counted_bars=IndicatorCounted();
//---- TODO: add your code here
double day_high=0;
double day_low=0;
double yesterday_high=0;
double yesterday_open=0;
double yesterday_low=0;
double yesterday_close=0;
double today_open=0;
double P=0,S=0,R=0,S1=0,R1=0,S2=0,R2=0,S3=0,R3=0;
//double D1=0.083333;
//double D2=0.166666;
//double D3=0.25;
//double D4=0.5;
int cnt=720;
double cur_day=0;
double prev_day=0;
double rates_d1[2][6];
//---- exit if period is greater than daily charts
if(Period() > 1440)
{
Print("Error - Chart period is greater than 1 day.");
return(-1); // then exit
}
//---- Get new daily prices & calculate pivots
while (cnt!= 0)
{
cur_day = TimeDay(Time[cnt]- (GMTshift*3600));
if (prev_day != cur_day)
{
yesterday_close = Close[cnt+1];
today_open = Open[cnt];
yesterday_high = day_high;
yesterday_low = day_low;
day_high = High[cnt];
day_low = Low[cnt];
prev_day = cur_day;
Comment ( yesterday_high + " " + yesterday_low + " " + yesterday_close );
}
if (High[cnt]>day_high)
{
day_high = High[cnt];
}
if (Low[cnt]Fibo_Pivot_Lines_GMT.jpg
发表于:2017-04-27 15:11只看该作者
2楼
谢谢分享!
韬客社区www.talkfx.co
发表于:2017-05-17 09:01只看该作者
4楼
谢谢分享!
韬客社区www.talkfx.co
发表于:2017-08-07 06:07只看该作者
5楼
谢谢分享~~~~~~~~~~~
韬客社区www.talkfx.co