Rachmad Imam Tarecha

Rachmad Imam Tarecha最新版

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

19 人已下载 手机查看

//+——————————————————————+
//| Rachmad Imam Tarecha.mq4 |
//| Copyright 2021, Rachmad Imam Tarecha. |
//| mailto:ri.tarecha@gmail.com |
//+——————————————————————+
#property copyright “Copyright 2021, Rachmad Imam Tarecha.”
#property link “mailto:ri.tarecha@gmail.com”
#property version “1.01”
#property strict
#property description “This is a research version EA, not a public version, not stable, not for sale, and for testing only. All promotional results are historical testing based, not guarantee future results. Please use at least 5.000 USC (CENT), 1 Lot, GBP/USD pair, M1 timeframes, and a free swap account only. Many backtesting showing good results at 10.000 USC (CENT) minimum balance, and 7 Lot. Forex trading is a high-risk investment, capital lost are at your own risk.”

//— input parameters
input int Lot=7;

//+——————————————————————+
//| Expert initialization function |
//+——————————————————————+

double buytp;
double buysl;
double record;
double buystart;
int sell;
int OnInit()
{
//—
Alert(“Danger! This is not stable version!”);
//—
return(INIT_SUCCEEDED);
}
//+——————————————————————+
//| Expert deinitialization function |
//+——————————————————————+
void OnDeinit(const int reason)
{
//—

}
//+——————————————————————+
//| Expert tick function |
//+——————————————————————+
void OnTick()
{
//—
double fractal = iFractals(“GBPUSD”,PERIOD_M1,MODE_LOWER,3);
double MaLong = iMA(“GBPUSD”,PERIOD_M1,200,0,MODE_SMA,PRICE_CLOSE,1);
double MaShort = iMA(“GBPUSD”,PERIOD_M1,50,0,MODE_SMA,PRICE_CLOSE,1);
double openfractal = iOpen(“GBPUSD”,PERIOD_M1,3);
double opennow = iOpen(“GBPUSD”,PERIOD_M1,1);
double bands = iBands(“GBPUSD”,PERIOD_M1,20,2,0,PRICE_CLOSE,MODE_LOWER,1);
double bandsmain = iBands(“GBPUSD”,PERIOD_M1,20,2,0,PRICE_CLOSE,MODE_MAIN,3);
double bandsatas = iBands(“GBPUSD”,PERIOD_M1,20,2,0,PRICE_CLOSE,MODE_UPPER,1);
double rsi = iRSI(“GBPUSD”,PERIOD_M1,14,PRICE_CLOSE,0);
double diffatas=iGator(“GBPUSD”,PERIOD_M1,13,8,8,5,5,3,MODE_SMMA,PRICE_MEDIAN,MODE_UPPER,1);
double diffbawah=iGator(“GBPUSD”,PERIOD_M1,13,8,8,5,5,3,MODE_SMMA,PRICE_MEDIAN,MODE_LOWER,1);
double gator = diffatas-diffbawah;
double op = iOpen(“GBPUSD”,PERIOD_M1,1);
double cl = iClose(“GBPUSD”,PERIOD_M1,1);
double cltick = iClose(“GBPUSD”,PERIOD_M1,0);
double cltick1 = iClose(“GBPUSD”,PERIOD_M1,1);
double hg=iHigh(“GBPUSD”,PERIOD_M1,0);
int highestcandle = iHighest(“GBPUSD”,PERIOD_M1,MODE_HIGH,50,0);
double hg50= High[highestcandle];
double iac=iAC(“GBPUSD”,PERIOD_M1,1);
int vol= iVolume(“GBPUSD”,PERIOD_M1,0);
double balance = AccountBalance();
double lot= Lot;
if(lot<=0){
lot=1;
}
if(lot>10){
lot=7;
}
if(balance<10000){
lot=1;
}
if (balance<4000){
ExpertRemove();
Alert(“Not enough balance! Force stop EA!”);
}
if(((((fractal!=0&&DayOfWeek()!=5)&&(fractal-Ask)<0.00020)&&MaLong>MaShort)&&(opennow-openfractal)<0.00070)&&(OrdersTotal()==0&&(((fractal>bands&&iac<0)&&(hg<bandsmain&&cltick<cltick1))&&((rsi>40)&&(op<cl&&Ask<(MaLong)))))){
//OrderSend(Symbol(),OP_BUY,0.95,Ask,3,0,Ask+0.00025,”Buy”,1412,0,clrBlueViolet);
buytp = Ask+0.00065;
buysl = Ask-0.00065;
//OrderSend(Symbol(),OP_BUYSTOP,0.45,Ask+0.00035,3,Ask+0.00015,Ask+0.00060,NULL,0,0,clrGreen);
OrderSend(“GBPUSD”,OP_SELLSTOP,0.01,Ask-0.00050,3,0,Ask-0.00170,NULL,0,0,clrRed);
//OrderSend(Symbol(),OP_SELL,0.3,Bid,3,0,Bid-0.00025,NULL,0,0,clrRed);
buystart=0;

}

if(buystart!=0&&OrdersTotal()==0){
if(Ask>=buystart+0.00050){
if(Ask<hg50-0.00050){
if(OrderSend(Symbol(),OP_BUY,lot,Ask,3,0,Ask+0.00200,”Buy”,1412,0,clrBlueViolet)<0){
ExpertRemove();
Alert(“Not enough balance! Force stop EA!”);
}
}
buystart=0;
}
}

for(int i=OrdersTotal(); i>=0;i–){
if(OrderSelect(i, SELECT_BY_POS)==true){
if(OrderType()==5||OrderType()==4){
if(TimeMinute(TimeCurrent()-OrderOpenTime())>45){
OrderDelete(OrderTicket());
// OrderSend(Symbol(),OP_BUY,0.01,Ask,3,buysl,0,”Buy”,1412,0,clrBlueViolet);
//OrderClose(OrderTicket(),OrderLots(),Bid, 5,clrRed);
//Print(TimeHour(TimeCurrent()));
//OrderClose(OrderTicket(),OrderLots(),Ask,5,clrRed);
//if(OrdersTotal()==1){
//OrderSend(Symbol(),OP_BUY,0.01,Ask,3,Ask-0.00065,Ask+0.00065,”Buy”,1412,0,clrBlueViolet);
//}
}
}else if(OrderType()==1){
//if(TimeMinute(TimeCurrent()-OrderOpenTime())>15){
if(Ask>buytp-0.00050){
OrderClose(OrderTicket(),OrderLots(),Ask,3,clrWhite);
//OrderSend(Symbol(),OP_BUY,1,Ask,3,0,Ask+0.00040,”Buy”,1412,0,clrBlueViolet);
buystart=Ask;
//OrderSend(“GBPUSD”,OP_BUYSTOP,lot,Ask+0.00050,3,0,Ask+0.00200,NULL,0,0,clrGreen);
record = Ask+0.00150;
}
//}
}else if(OrderType()==0){
if(Ask>record){
OrderModify(OrderTicket(),OrderOpenPrice(),Ask-0.00050,Ask+0.00200,0,clrAqua);
record = Ask+0.00150;
}

}

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

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

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

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

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

相关资源

暂无评论

暂无评论...