day open

day open最新版

官方版无广告139

更新日期:2022-03-02分类标签: 语言:中文平台:没限制

7 人已下载 手机查看

//+——————————————————————+
//| day open.mq4 |
//| Copyright 2014, MetaQuotes Software Corp. |
//| http://www.mql5.com |
//+——————————————————————+
#property copyright “Copyright 2014, MetaQuotes Software Corp.”
#property link “http://www.mql5.com”
#property version “1.00”
#property strict
extern double LOT=0.01;
extern int Profit=10;
int bars;
bool trade;
//+——————————————————————+
//| Expert initialization function |
//+——————————————————————+
int OnInit()
{
trade=false;
bars=iBars(Symbol(),PERIOD_D1);
return(INIT_SUCCEEDED);
}
//+——————————————————————+
//| Expert deinitialization function |
//+——————————————————————+
void OnDeinit(const int reason)
{
//—

}
//+——————————————————————+
//| Expert tick function |
//+——————————————————————+
void OnTick()
{
if (bars!=iBars(Symbol(),PERIOD_D1)){bars=iBars(Symbol(),PERIOD_D1);trade=true;}

if (trade){
OrderSend(Symbol(),OP_BUY,LOT,Ask,2,0,0,NULL,0123456,0,clrRed);
OrderSend(Symbol(),OP_SELL,LOT,Bid,2,0,0,NULL,0123456,0,clrRed);
trade=false;
}

int tot=OrdersTotal();

for(int i=0; i<=tot;i++)
{OrderSelect(i,SELECT_BY_POS,MODE_TRADES);
if (OrderSymbol()==Symbol() &&OrderMagicNumber()==0123456)
{
if(OrderType()==OP_BUY){if (Bid>= OrderOpenPrice()+Profit*Point)OrderClose(OrderTicket(),LOT,Bid,2,clrAqua);}

if(OrderType()==OP_SELL){if (Ask<= OrderOpenPrice()-Profit*Point)OrderClose(OrderTicket(),LOT,Ask,2,clrAqua);}
}

}

}
//+——————————————————————+

如果你对文件有了解,请帮助投票!

If you are familiar with the file, please help vote!

平均评分 0 / 5. 投票数: 0

到目前为止还没有投票!成为第一位投票人。

相关资源

暂无评论

暂无评论...
Ads Blocker Image Powered by Code Help Pro

检测到广告拦截程序!!!Ads Blocker Detected!!!

我们检测到您正在使用扩展来屏蔽广告。请通过禁用这些广告屏蔽程序或者把网站加入白名单来支持我们。

We have detected that you are using an extension to block advertisements. Please support us by disabling these advertising blocking programs or adding the website to the whitelist.