support 发表于 2022-12-31 12:21:52

WindowPriceMax( )【窗口篇-MQL4函数】

double WindowPriceMax( void index)
返回当前图表指定子窗口的最大垂直标度的值(0为主菜单图表,指标子窗口的开始数字为1 )。 如果子窗口没有指定,最大价格标度的值返回图表窗口。
参见 WindowPriceMin(), WindowFirstVisibleBar(), WindowBarsPerChart()

参数:
index   -   图表子窗口索引 (0 -主图表窗口)。



double   top=WindowPriceMax();
double   bottom=WindowPriceMin();
datetime left=Time;
int      right_bound=WindowFirstVisibleBar()-WindowBarsPerChart();
if(right_bound<0) right_bound=0;
datetime right=Time+Period()*60;
//----
ObjectCreate("Padding_rect",OBJ_RECTANGLE,0,left,top,right,bottom);
ObjectSet("Padding_rect",OBJPROP_BACK,true);
ObjectSet("Padding_rect",OBJPROP_COLOR,Blue);
WindowRedraw();

luck88 发表于 2023-2-9 14:14:01

谢谢
页: [1]
查看完整版本: WindowPriceMax( )【窗口篇-MQL4函数】