[MT4指标]Instrument蜡烛图
主图指标
mt4指标类型:趋势指标
是否能用在mt4手机版上:否
是否含有未来函数:无
//+------------------------------------------------------------------+
//| Instrument.mq4 |
//| Denis Orlov |
//| http://denis-or-love.narod.ru |
/*
腻龛? 勿腩?
http://denis-or-love.narod.ru
***
埋? 祛? 桧滂赅蝾瘥:
http://codebase.mql4.com/ru/author/denis_orlov
***
衔塑怯梢叛? ? 闲沃屡依梢?!
Sorry for my English!)
Denis Orlov
http://denis-or-love.narod.ru
***
All my indicators:
http://codebase.mql4.com/author/denis_orlov
*/
//+------------------------------------------------------------------+
#property copyright "Denis Orlov"
#property link "http://denis-or-love.narod.ru"
#property indicator_chart_window
#property indicator_buffers 4
#property indicator_color1 DarkTurquoise
#property indicator_color2 DarkBlue
#property indicator_color3 DarkTurquoise
#property indicator_color4 DarkBlue
double Line1, Line2, Line3, Line4;
extern string Instrument="";
extern int TimeFrame=0;
extern int VertShift=0;
extern int HorizShift=0;
extern int History=1000;
extern bool GoldColor=False;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
SetIndexStyle(0,DRAW_HISTOGRAM,0,3);
SetIndexBuffer(0,Line1);
SetIndexShift( 0, HorizShift);
SetIndexStyle(1,DRAW_HISTOGRAM,0,3);
SetIndexBuffer(1,Line2);
SetIndexShift( 1, HorizShift);
SetIndexStyle(2,DRAW_HISTOGRAM,0,1);
SetIndexBuffer(2,Line3);
SetIndexShift( 2, HorizShift);
SetIndexStyle(3,DRAW_HISTOGRAM,0,1);
SetIndexBuffer(3,Line4);
SetIndexShift( 3, HorizShift);
if(GoldColor)
{
SetIndexStyle(0,DRAW_HISTOGRAM,0,3,Yellow);
SetIndexStyle(1,DRAW_HISTOGRAM,0,3,Orange);
SetIndexStyle(2,DRAW_HISTOGRAM,0,1,Yellow);
SetIndexStyle(3,DRAW_HISTOGRAM,0,1,Orange);
}
if (Instrument=="") Instrument=Symbol();
if (TimeFrame==0) TimeFrame=Period();
IndicatorShortName(Instrument+" "+PeriodToStr(TimeFrame)+": shift "+VertShift);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int Counted_bars=IndicatorCounted();
//----
int i=Bars-Counted_bars-1; // 软溴犟 镥疴钽? 礤镱聍栩囗眍泐
if (History>0&&i>History) // 篷腓 祉钽? 徉痤? 蝾 ..
i=History;
while(i>=0) // 骤觌 镱 礤镱聍栩囗睇? 徉疣?
{
double
H=iHigh(Instrument, TimeFrame,i),
L=iLow(Instrument, TimeFrame,i),
O=iOpen(Instrument,TimeFrame,i),
C=iClose(Instrument, TimeFrame,i);
if(C>O)
{
Line1=C+VertShift*Point; Line2=O+VertShift*Point;
Line3=H+VertShift*Point; Line4=L+VertShift*Point;
}
else
if(CInstrument.jpg
发表于:2016-06-23 08:04只看该作者
2楼
指标很灵敏,指示性也很强
韬客社区www.talkfx.co
发表于:2021-01-14 23:55只看该作者
3楼
hhhhhhhhhhhhhhhhhhhhhhhh
韬客社区www.talkfx.co