#define MAGICMA 20131111
int CalculateCurrentOrders(string symbol)
{
int buys=0,sells=0;
//----
for(int i=0;i0) return(buys);
else return(-sells);
}
void CheckForOpen()
{
double amt1,amt2,bmt1,bmt2;
int res;
if(Volume[0]>1) return;
amt1=iMA(NULL,0,4,0,MODE_SMA,PRICE_CLOSE,0);
amt2=iMA(NULL,0,4,0,MODE_SMA,PRICE_CLOSE,1);
bmt1=iMA(NULL,0,12,0,MODE_SMA,PRICE_CLOSE,0);
bmt2=iMA(NULL,0,12,0,MODE_SMA,PRICE_CLOSE,1);
if(amt2>bmt2 && amt1<=bmt1)//黄线下穿紫线(卖出)
{
res=OrderSend(Symbol(),OP_SELL,0.1,Bid,3,0,0,"",MAGICMA,0,Red);
return;
}
}
void OnTick()
{
if(Bars
- [ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3.
- 新人对MQL4和MQL5的任何问题,对算法和代码的帮助和讨论
- 哪位高人可以把这个EA的每一句代表什么意思做个翻译!你会有意想不到的收获!
第一条线下穿第二条线时卖出,就是不开仓。