[MT4指标]Brooky_Psar_Levels指标
主图指标 Brooky_Psar_Levels指标
mt4指标类型:震荡指标
是否能用在mt4手机版上:否
是否含有未来函数:无//+------------------------------------------------------------------+
//| Brooky_Psar_Levels.mq4 |
//| Copyright ? 2010, www.Brooky-Indicators.com. |
//| http://www.www.Brooky-Indicators.com |
//+------------------------------------------------------------------+
#property copyright \"Copyright ? 2010, www.Brooky-Indicators.com.\"
#property link \"http://www.www.Brooky-Indicators.com\"
extern string Hello_From = \" www.Brooky-Indicators.com \";
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 DarkOrange
#property indicator_color2 DodgerBlue
//---- input parameters
extern int bars_back = 200;
extern double sar_step = 0.02;
extern double sar_max = 0.2;
extern int level_style = 2;
extern int price_size = 2;
extern color lowpsar = DodgerBlue;
extern color hipsar = DarkOrange;
string indi = \"Brooky-Psar\";
//---- buffers
double plow;
double phi;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
SetIndexStyle(0,DRAW_ARROW);
SetIndexArrow(0,118);
SetIndexBuffer(0,plow);
SetIndexEmptyValue(0,0.0);
SetIndexStyle(1,DRAW_ARROW);
SetIndexArrow(1,118);
SetIndexBuffer(1,phi);
SetIndexEmptyValue(1,0.0);
IndicatorShortName(indi);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
for(int j=0; j0) counted_bars--;
limit=Bars-counted_bars;
if(limit>bars_back)limit=bars_back;
//---- main loop
double mysarnow,myopen,mysarb4,myopenb4;
for(int i=0; i=myopen && mysarb4myopenb4)
{
phi=mysarnow;
string sup = indi+\"Sup\"+bardelete;
ObjectCreate(sup, OBJ_HLINE, 0, Time, mysarnow);
ObjectSet(sup, OBJPROP_STYLE, level_style);
ObjectSet(sup, OBJPROP_COLOR,lowpsar);
ObjectSet(sup, OBJPROP_RAY,1);
string nameu = indi+\"aUp\"+bardelete;
ObjectCreate(nameu,OBJ_ARROW, 0, Time, mysarnow);
ObjectSet(nameu, OBJPROP_STYLE, STYLE_SOLID);
ObjectSet(nameu, OBJPROP_ARROWCODE, 5);
ObjectSet(nameu, OBJPROP_COLOR,lowpsar);
ObjectSet(nameu, OBJPROP_WIDTH,price_size);
}else phi=0.0;
}
//---- done
return(0);
}
//+------------------------------------------------------------------+
发表于:2017-08-10 23:12只看该作者
2楼
阅尽天下指标
韬客社区www.talkfx.co