初学MQL4 求教高手

 

REF(LOW,1)); //向前引用 MQL4 怎么表示

H10:=HHV(HIGH,10); //10天最高 MQL4 怎么表示
L10:=LLV(LOW,10); //10天最低 MQL4 怎么表示

上次条件成立位置:BARSLAST(条件A > 条件B); //上次条件成立位置 MQL4 怎么表示

 
REF(LOW,1)); => Close[1] See https://docs.mql4.com/cn/predefined/variables


H10:=HHV(HIGH,10);
L10:=LLV(LOW,10); iHighest(Symbol(),0,MODE_HIGH,10,0)
See https://docs.mql4.com/cn/series

BARSLAST(条件A > 条件B); - I don't understand what it means.
 
谢谢 学习
 
Rosh, you can not understand him, since those appear on some chinese stock software.

MQL4象C语言

REF(LOW,1)); //向前引用 MQL4 怎么表示      数组标准写法   Low[1]

H10:=HHV(HIGH,10); //10天最高 MQL4 怎么表示        High[iHighest(NULL, 0,MODE_HIGH, 10, 0)]
L10:=LLV(LOW,10); //10天最低 MQL4 怎么表示     Low[iLowest(NULL, 0, MODE_LOW, 10, 0)]

上次条件成立位置:BARSLAST(条件A > 条件B); //上次条件成立位置 MQL4 怎么表示  
What is bar index of last time of A>B condition arrived.
    没有,需要自己用更多代码计算

看帮助和例子吧

 

谢谢楼上的老师

上次条件成立位置:BARSLAST(条件A > 条件B);

能给个MQL4的例子么?

 
I don't understand. may be you'll attach the pictures?
 

Rosh 老师看看这个公式能改成mt4的么??



HH:=HHV(HIGH,20); //20天最高
LL:=LLV(LOW,20); //20天最低
BU:=BARSLAST((HIGH= HHV(HIGH,20))); //BARSLAST 是上次条件成立位置
SE:=BARSLAST((LOW = LLV(LOW,20)));
KK1:=SE;
KK2:=BU;
OK:=SE>BU;
OK1:=SE<BU;
STICKLINE(OK1,CLOSE,OPEN,7,0),colorFF0000;
STICKLINE(OK1,HIGH,LOW,0,0),colorFF0000;
STICKLINE(OK,CLOSE,OPEN,7,0),color0000FF;
STICKLINE(OK,HIGH,LOW,0,0),color0000FF;
PARTLINE(OK1,HH),LINETHICK3,colorFF0000; //SE<BU 时 画20天最高
PARTLINE(OK,LL),LINETHICK3,color0000FF; //SE>BU 时 画20天最低

是上次条件成立位置(上次条件成立以来的天数) MQL4 怎么表示



 
See 'Price Channel'; (Price Channel)
 

Price Channel 里面缺少 条件成立以来的天数

Rosh 老师能给个MQL4的例子么?

 
You can change Number of days

#property link      "http://forex.kbpauk.ru/"
 
#property indicator_chart_window
#property indicator_buffers 3
#property indicator_color1 Red
#property indicator_color2 Blue
#property indicator_color3 DodgerBlue
//---- input parameters
extern int ChannelPeriod = 14;
//---- buffers
double UpBuffer[];
Double DnBuffer[];
Double MdBuffer[];
This input is extern int ChannelPeriod = 14;
 

谢谢 Rosh老师

原因: