← Назад к списку файлов

multi_lot_scapler_p_day_jly3.mq4

Поиск по коду файла

#include <stdlib.mqh>

extern double Lots = 0.10;
extern double StopLoss = 100;
extern double TakeProfit = 10.00;
extern double TrailingStop = 5.00;

extern double MaxTrades = 5;
extern double Pips = 2;
extern double SecureProfit = 10;
extern double AccountProtection = 1;
extern double OrderstoProtect = 3;
extern double ReverseCondition = 0;
extern double EURUSDPipValue = 10;
extern double GBPUSDPipValue = 10;
extern double USDCHFPipValue = 7.94;
extern double USDJPYPipValue = 9.03;
extern double mm = 0;
extern double risk = 12;
extern double AccountisNormal = 0;
extern double TimeZoneofData = 0;

double OpenOrders = 0;
int cnt = 0;
double slippage = 5;
double sl = 0;
double tp = 0;
double BuyPrice = 0;
double SellPrice = 0;
double lotsi = 0;
double mylotsi = 0;
double mode = 0;
double MyOrderType=0;
bool ContinueOpening = True;
double LastPrice = 0;
double PreviousOpenOrders = 0;
double Profit = 0;
double LastTicket = 0;
double LastType = 0;
double LastClosePrice = 0;
double LastLots = 0;
double Pivot = 0;
double PipValue = 0;
bool Reversed = False;
string text = "";
string text2 = "";
double myl = 0;
double myh = 0;
double myC = 0;
double myO = 0;
double mypivot = 0;
double Today = 0;
double RefDate = 0;
double LastBarOfDay = 0;
double FirstBarOfDay = 0;
double Loop = 0;
double myyh = 0;
double myyl = 0;
double myyc = 0;
double p = 0;
double flp = 0;
double feh = 0;
double fel = 0;
double ph = 0;
double pl = 0;
double gap = 0;

bool SetObjectText(string name, string text, string font, int size, color Acolor)
{
   return(ObjectSetText(name, text, size, font, Acolor));
}

bool MoveObject(string name, int type, datetime Atime, double Aprice, datetime Atime2 = 0, double Aprice2 = 0, color Acolor = CLR_NONE, int Aweight = 0, int Astyle = 0)
{
   if (ObjectFind(name) != -1) {
      int OType = ObjectType(name);

      if ((OType == OBJ_VLINE) ||
         (OType == OBJ_HLINE) ||
         (OType == OBJ_TRENDBYANGLE) ||
         (OType == OBJ_TEXT) ||
         (OType == OBJ_ARROW) ||
         (OType == OBJ_LABEL)) {
         return(ObjectMove(name, 0, Atime, Aprice));
      }

      if ((OType == OBJ_GANNLINE) ||
         (OType == OBJ_GANNFAN) ||
         (OType == OBJ_GANNGRID) ||
         (OType == OBJ_FIBO) ||
         (OType == OBJ_FIBOTIMES) ||
         (OType == OBJ_FIBOFAN) ||
         (OType == OBJ_FIBOARC) ||
         (OType == OBJ_RECTANGLE) ||
         (OType == OBJ_ELLIPSE) ||
         (OType == OBJ_CYCLES) ||
         (OType == OBJ_TREND) ||
         (OType == OBJ_STDDEVCHANNEL) ||
         (OType == OBJ_REGRESSION)) {
         return(ObjectMove(name, 0, Atime, Aprice) && ObjectMove(name, 1, Atime2, Aprice2));
      }
   }
   else {
      return(ObjectCreate(name, type, 0, Atime, Aprice, Atime2, Aprice2, 0, 0) && ObjectSet(name, OBJPROP_COLOR, Acolor));
   }
}

int init()
{
      // код доступен только после оплаты
   }
int start()
{
      // код доступен только после оплаты
   }

if( AccountisNormal == 1 ) {
   if( mm != 0 ) lotsi = MathCeil(AccountBalance() * risk / 10000) ; else lotsi = Lots;
}
else {
   if( mm != 0 ) lotsi = MathCeil(AccountBalance() * risk / 10000) / 10 ; else lotsi = Lots;
}

if( lotsi > 100 ) lotsi = 100;

OpenOrders = 0;
for( cnt = 0; cnt < OrdersTotal(); cnt++ ) {
   OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
   if( OrderSymbol() ==  Symbol() ) OpenOrders++;
}
myh = High[0];
myl = Low[0];
myC = Close[0];
myO = Open[0];
myyh = High[1];
myyl = Low[1];
myyc = Close[1];
p  = (myyh + myyl + myyc + myO) / 4;
ph = (myyh + myh + myyc + myO) / 4;
pl = (myyl + myl + myyc + myO) / 4;
flp = (myh + myl + myC) / 3;
gap = MathAbs(p - flp) * 10000;

MoveObject("P",OBJ_HLINE,Time[0],p,Time[0],p,Gold,1,STYLE_SOLID);
SetObjectText("P_txt","Pivot Zone","Arial",7,White);
MoveObject("P_txt",OBJ_TEXT,Time[0],p,Time[0],p,White);

if( Ask > p && Ask > flp ) {
   MoveObject("FLP",OBJ_HLINE,Time[0],flp,Time[0],flp,LimeGreen,1,STYLE_SOLID);
   SetObjectText("FLP_txt","Floating Trend Direction - LONG","Arial",7,White);
   MoveObject("FLP_txt",OBJ_TEXT,Time[0],flp,Time[0],flp,White);
   Comment("Account: ",AccountNumber()," - ",AccountName(),"'#10'LastPrice=",LastPrice," Previous open orders=",PreviousOpenOrders,"'#10'Continue opening=",ContinueOpening," OrderType=",MyOrderType,"'#10'",text2," Balance: ",DoubleToStr(AccountBalance(),2),"'#10'Lots=",lotsi,"'#10'",text,"Trend Bias -- LONG");
}

if( Bid < p && Bid < flp ) {
   MoveObject("FLP",OBJ_HLINE,Time[0],flp,Time[0],flp,Red,1,STYLE_SOLID);
   SetObjectText("FLP_txt","Floating Trend Direction - SHORT","Arial",7,White);
   MoveObject("FLP_txt",OBJ_TEXT,Time[0],flp,Time[0],flp,White);
   Comment("Account: ",AccountNumber()," - ",AccountName(),"'#10'LastPrice=",LastPrice," Previous open orders=",PreviousOpenOrders,"'#10'Continue opening=",ContinueOpening," OrderType=",MyOrderType,"'#10'",text2," Balance: ",DoubleToStr(AccountBalance(),2),"'#10'Lots=",lotsi,"'#10'",text,"Trend Bias -- SHORT");
}

   PipValue = 5;
   if (Symbol()== "EURUSDm") PipValue = EURUSDPipValue;
   if (Symbol()== "GBPUSDm") PipValue = GBPUSDPipValue;
   if (Symbol()== "USDJPYm") PipValue = USDJPYPipValue;
   if (Symbol()== "USDCHFm") PipValue = USDCHFPipValue; 

if( PreviousOpenOrders > OpenOrders ) {
   for( cnt = OrdersTotal()-1; cnt >= 0; cnt-- ) {
      OrderSelect(cnt

Показано первые 50% кода (символов: 7881)

Как получить полную версию?

Введите ваш email и нажмите кнопку, чтобы перейти к оплате.