老师好,能不能帮我用MQ语言编写以下程序。麻烦老师了,谢谢
MQ模型编写比较复杂,预计15点前回复
参考:
Vars
Numeric YFS;
Numeric BFS;
Numeric YFS1;
Numeric BFS1;
Numeric YFH;
Numeric BFH;
Numeric YFL;
Numeric BFL;
Begin
YFS=ValueWhen(DayBarPos==1,IsUp);
BFS=ValueWhen(Time==0.0900,IsUp);
YFS1=ValueWhen(DayBarPos==1,IsDown);
BFS1=ValueWhen(Time==0.0900,IsDown);
YFH=ValueWhen(DayBarPos==1,High);
BFH=ValueWhen(Time==0.0900,High);
YFL=ValueWhen(DayBarPos==1,Low);
BFL=ValueWhen(Time==0.0900,Low);
If(YFS1&&Time>=0.2115&&Time<0.2300&&Close>YFH)
{
Buy;
}
If(Close<YFL)
{
Sell;
}
If(BFS1&&Time>=0.0915&&Time<0.1415&&Close>BFH)
{
Buy;
}
If(Close<BFL)
{
Sell;
}
If(YFS&&Time>=0.2115&&Time<0.2300&&Close<YFL)
{
SellShort;
}
If(Close>YFH)
{
BuyToCover;
}
If(BFS&&Time>=0.0915&&Time<0.1415&&Close<BFL)
{
SellShort;
}
If(Close>BFH)
{
BuyToCover;
}
If(Time>=0.1459)
{
Sell;
}
If(Time>=0.1459)
{
BuyToCover;
}
End