[MT4指标]秃鹫老师,请您修改下显示每根K线的波幅Bar range 指标
显示每根K线的波幅Bar range 会将每根K线的最高价最低价相差的点数显示在K线下面。\ \m G Y'0 没必要显示每一根,请秃鹫老师改成只显示当前4根K线的波幅.9S*"={}% 另外bug:1、有时不会自动更新,切换一下Timeframe就好了 ~~Ezt*lH 2、会影响到你添加在图表上的线条和标记:一旦你切换timeframe,原先添加的线条和标记就会消失 ElV!C}g
[ 本帖最后由 jialele 于 2011-1-30 15:55 编辑 ]0912011412f2c45f600c4cc484.gifBarRange2.rarBarRange2.rar
2楼
只要显示当前4根K线波幅的数字就可以了
韬客社区www.talkfx.co
发表于:2011-05-03 18:55只看该作者
3楼
虽然不稀饭!但还是顶哈子!!!
------------------------------
Designer Jewelry, for a number of Palestinian prisoners.
韬客社区www.talkfx.co
发表于:2011-05-11 04:57只看该作者
4楼
//+------------------------------------------------------------------+
//| Daily Range.mq4 |
//+------------------------------------------------------------------+
//| 505068266 |
//+------------------------------------------------------------------+
#property copyright "http:///sewenbin "
#property link "[email protected]"
#property indicator_chart_window
#property indicator_buffers 1
#property indicator_color1 Red
double BufferRange;
string PatternText[4];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
// IndicatorBuffers(1);
SetIndexStyle(0, DRAW_ARROW, 0, 1);
SetIndexArrow(0, 172);
SetIndexBuffer(0,BufferRange);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
ObjectsDeleteAll();
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int counted_bars=IndicatorCounted();
double bar_range;
//----
if (counted_bars < 0) {
return(-1);
}
if (counted_bars > 0) {
counted_bars--;
}
int pos = Bars-counted_bars;
// string PatternText[5000];
for(int j = 0; j < Bars; j++)
{
PatternText[j] = "pattern-" + j;
}
while (pos>=0) {
bar_range = (High[pos] - Low[pos]);
if (Digits < 4) bar_range = bar_range * 100; else bar_range = bar_range * 10000;
ObjectCreate(PatternText[pos], OBJ_TEXT, 0, Time[pos], Low[pos]);
ObjectSet(PatternText[pos], OBJPROP_YDISTANCE, 200);
ObjectSetText(PatternText[pos], DoubleToStr(bar_range, 0), 10, "Verdana", White);
BufferRange[pos] = bar_range;
pos--;
}
//----
return(0);
}
//+------------------------------------------------------------------+
韬客社区www.talkfx.co