포럼을 어지럽히 지 않도록 모든 초보자 질문. 프로, 놓치지 마세요. 너 없이는 아무데도 - 6. - 페이지 1139

 
kuznat399 :
안드로이드용 로봇이 있나요?


Metatrader의 모바일 버전에는 자동 거래가 없으며 가까운 장래에 나타나지 않을 것입니다. 휴대 전화에서 로봇을 조종하려면 로봇이있는 터미널이있는 VPS와 휴대 전화의 원격 액세스 프로그램이 필요합니다.
 
테스터(빌드 1065)에 시각화가 표시되지 않는지 알려주세요. 고칠 수 있습니까?
 
MT5에서 주간 통화 쌍 차트 10개를 열면 800MB의 틱 기록 이 터미널에 로드됩니다. 그리고 그래프에 거의 변화가 없지만 지속적으로 로드됩니다. 질문 - 주간 차트만 사용하는 경우 틱 기록이 필요한 이유는 무엇입니까? 그건 그렇고, MT4에서는 주간 차트가 지연 없이 즉시 열립니다.
 
sober :
MT5에서 주간 통화 쌍 차트 10개를 열면 800MB의 틱 기록 이 터미널에 로드됩니다. 그리고 그래프에 거의 변화가 없지만 지속적으로 로드됩니다. 질문 - 주간 차트만 사용하는 경우 틱 기록이 필요한 이유는 무엇입니까? 그건 그렇고, MT4에서는 주간 차트가 지연 없이 즉시 열립니다.


이것은 MT5의 기능입니다. M1에 모든 것을 로드한 다음 필요한 기간을 빌드합니다... selyavi (

그래서 매번 캐릭터마다

 
MT5에는 2개의 플러그형 블록(신호 및 주문 배치 블록 및 후행 블록)이 있습니다. MQL5로 가져왔습니다. Expert Advisor를 생성할 때 신호 블록에는 표시되지 않지만 후행 블록에는 표시됩니다. "MQL5\Include\Expert\Signal" 및 "MQL5\Include\Expert" 파일을 배치했습니다. 도와주세요.
 

어드바이저의 아이디어는 가격이 수평 수준 또는 수동으로 그려진 추세선에 닿을 때 매수 또는 매도하는 것입니다. 다양한 작업 고문과 지표의 고문을 편집했습니다. 그러나 고문은 작동하지 않습니다. 오히려 첫 번째 틱에서 신호 없이 SELL만 엽니다. 뭐가 문제 야?

/+------------------------------------------------ ------------------+

//| |

//| Copyright © 2010, MetaQuotes Software Corp. |

//| http://www.mql4.com/ru/users/rustein |

//+----------------------------------------------- --------------------+

#define MAGIC 131313 // 채널 내부에서 열기

//----------------------------------------



외부 정수 TF=15;


//+----------------------------------------------- --------------------+

extern int 손절매 = 300;

//------------------------------------------------ ------



외부 이중 TakeProfit = 3000;

//-------------------------------


외부 정수 Per_MA= 20;



//---- 상수


#define OP_BUY_0

#define OP_SELL_1



//------------------------------------------------ --------------------+

extern 이중 랏 = 0.1;

외부 이중 최대 위험 = 1;

외부 이중 DecreaseFactor = 0;



부울 b_1=참, s_1=참;


//+----------------------------------------------- --------------------+

//| 오픈 포지션 계산 |

//+----------------------------------------------- --------------------+

이중 MA=iMA(NULL,TF,Per_MA,0,0,0,1);





int CalculateCurrentOrders(문자열 기호)

{

구매 = 0, 판매 = 0;

//----

for(int i=0;i<OrdersTotal();i++)

{

if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)==false) 중단;

if(OrderSymbol()==Symbol() && OrderMagicNumber()==MAGIC)

{

if(OrderType()==OP_BUY) 구매++;

if(OrderType()==OP_SELL) 판매++;

}

}

//---- 반품 주문량

if(매수>0) 반환(매수);

그렇지 않으면 반환(-판매);

}

//+----------------------------------------------- --------------------+

//| 최적 로트 크기 계산 |

//+----------------------------------------------- --------------------+

이중 LotOptimized()

{

이중 로트 = 로트;

int 주문 = HistoryTotal(); // 히스토리 주문 합계

정수 손실 = 0; // 중단 없는 손실 주문 수

//---- 로트 크기 선택

//lot=NormalizeDouble(AccountFreeMargin()*MaximumRisk/1000.0,2);

lot=NormalizeDouble(AccountFreeMargin()*MaximumRisk/100/MarketInfo(Symbol(),MODE_TICKVALUE)/StopLoss,2);

//---- 중단 없이 손실 주문 수를 계산합니다.

if(감소인자>0)

{

for(int i=orders-1;i>=0;i--)

{

if(OrderSelect(i,SELECT_BY_POS,MODE_HISTORY)==false) { Print("기록에 오류가 있습니다!"); 부서지다; }

if(OrderSymbol()!=Symbol() || OrderType()>OP_SELL) 계속;

//----

if(OrderProfit()>0) 휴식;

if(OrderProfit()<0) 손실++;

}

if(손실>1) lot=NormalizeDouble(lot-lot*losses/DecreaseFactor,2);

}

//---- 반환 로트 크기

if(lot<0.01) lot=0.01;

반환(로트);

}

//------------------------------------------------ -

/* 표시기의 이 부분 */

int CheckBreakoutLines(int shift)

{

// 총 개체

int obj_total = ObjectsTotal();

// 막대의 시간

지금 날짜 시간 = 시간[시프트];

// 반복

for(int i = obj_total - 1; i >= 0; i--)

{

// 객체 이름

문자열 레이블 = ObjectName(i);

// 유형

정수 OType = ObjectType(레이블);

부울 추세선 = 거짓;

부울 hline = 거짓;

// 평가할 가격

이중 가격 = 0;

// 추세선

if(O 유형 == OBJ_TREND )

{

부울 레이 = ObjectGet(레이블, OBJPROP_RAY);

만약(!레이)

{

날짜 시간 x1 = ObjectGet(레이블, OBJPROP_TIME1);

날짜 시간 x2 = ObjectGet(레이블, OBJPROP_TIME2);

if(x1 < 지금 && x2 < 지금) 계속;

}

cprice = GetCurrentPriceOfLine(레이블, 시프트);

추세선=참;

} else if(OType == OBJ_HLINE ) {

cprice = ObjectGet(레이블, OBJPROP_PRICE1);

hline=참;

} 또 다른 {

계속하다;

}

// 추세선 및 hlines의 브레이크아웃 및 잘못된 브레이크아웃

if(MA>cprice &&Ask<cprice)

{

if(추세선) { 반환(OP_BUY_); } else if(hline) { return(OP_BUY_); }

} else if (MA>cprice &&Ask<cprice) {

if(추세선) { 반환(OP_SELL_); } else if(hline) { return(OP_SELL_); }

}

}

반환( EMPTY_VALUE );

}


이중 GetCurrentPriceOfLine(문자열 레이블, int 시프트)

{

두 배 가격1 = ObjectGet(레이블, OBJPROP_PRICE1);

이중 가격2 = ObjectGet(레이블, OBJPROP_PRICE2);

날짜 시간 d1 = ObjectGet(레이블, OBJPROP_TIME1);

날짜 시간 d2 = ObjectGet(레이블, OBJPROP_TIME2);

int shiftfrom = iBarShift(기호(), 0, d1, 거짓);

int shiftto = iBarShift(기호(), 0, d2, 거짓);

int 경과 = MathAbs(shiftto - shiftfrom);

int 거리 = MathAbs(shift - shiftfrom);

이중 펜던트 = (price2 - price1) / 경과;

이중 cpoint = price1 + (거리 * pendiente);

반환(cpoint);

}


//------------------------------------------------ -------------------------------------------------- -----------

//+----------------------------------------------- --------------------+

//| 미결 주문 조건 확인 |

//+----------------------------------------------- --------------------+

무효 CheckForOpen()

{

인트르;


//------------------------------------------------ --------------------+

//------------------------------------------------ --------------------+

//---- 구매 조건

if(OP_BUY_&&b_1)

{

res=OrderSend(Symbol(),OP_BUY,LotsOptimized(),Ask,3,Ask-(StopLoss*Point),Ask+TakeProfit*Point," VV",MAGIC,0,Green);

b_1=거짓; s_1=참;

반품;

}


//---- 판매 조건

if(OP_SELL_&&s_1)

{

res=OrderSend(Symbol(),OP_SELL,LotsOptimized(),Bid,3,Bid+(StopLoss*Point),Bid-TakeProfit*Point," VV",MAGIC,0,Red);

s_1=거짓, b_1=참,

반품;

}

//----

}


//+----------------------------------------------- --------------------+

//| 시작 기능 |

//+----------------------------------------------- --------------------+

무효 시작()

{

//---- 내역 및 거래 확인

if(Bars<100 || IsTradeAllowed()==false) 반환;

//---- 현재 기호로 미결 주문 계산

if(CalculateCurrentOrders(Symbol())==0) CheckForOpen();

}


//+----------------------------------------------- --------------------+

//|---------------------// 끝 //--------------- ------ ------|

//+----------------------------------------------- --------------------+

Warstein
Warstein
  • www.mql5.com
Профиль трейдера
 
ValerVL35 :

어드바이저의 아이디어는 가격이 수평 수준 또는 수동으로 그려진 추세선에 닿을 때 매수 또는 매도하는 것입니다. 다양한 작업 고문과 지표의 고문을 편집했습니다. 그러나 고문은 작동하지 않습니다. 오히려 첫 번째 틱에서 신호 없이 SELL만 엽니다. 뭐가 문제 야?

/+------------------------------------------------ ------------------+

//| |

//| Copyright © 2010, MetaQuotes Software Corp. |

//| http://www.mql4.com/ru/users/rustein |

//+----------------------------------------------- --------------------+

#define MAGIC 131313 // 채널 내부에서 열기

//----------------------------------------



외부 정수 TF=15;


//+----------------------------------------------- --------------------+

extern int 손절매 = 300;

//------------------------------------------------ ------



외부 이중 TakeProfit = 3000;

//-------------------------------


외부 정수 Per_MA= 20;



//---- 상수


#define OP_BUY_0

#define OP_SELL_1

..................................................................

..................................................................

//---- 내역 및 거래 확인

if(Bars<100 || IsTradeAllowed()==false) 반환;

//---- 현재 기호로 미결 주문 계산

if(CalculateCurrentOrders(Symbol())==0) CheckForOpen();

}


//+----------------------------------------------- --------------------+

//|---------------------// 끝 //--------------- ------ ------|

//+----------------------------------------------- --------------------+

메모장에 프로그램을 로드하고 빈 줄을 삭제했습니다. 살펴볼 수 있는 기회가 있었습니다. SRC 버튼을 누르고 삽입했습니다. 여기 무슨 일이 있었는지. 1) 정의하는 이유

 #define OP_BUY_   0
#define OP_SELL_ 1

이미 OP_BUY=0 및 OP_SELL=1이 있는 경우

2) 악의 뿌리는 이 부분에 있다. 동일한 조건(MA>cprice &&Ask<cprice)을 두 번 확인하고 다른 결정을 내립니다.

        // Breakouts and false breakouts of trendlines and hlines
       if (MA>cprice && Ask <cprice)
      {
         if (trendline) { return (OP_BUY_); } else if (hline) { return (OP_BUY_); }
      } else if (MA>cprice && Ask <cprice) {
         if (trendline) { return (OP_SELL_); } else if (hline) { return (OP_SELL_); }    
      }

3) 각 지점에서 추가 검사를 수행하지만 결과는 여전히 동일합니다.

 if (trendline) { return (OP_BUY_); } else if (hline) { return (OP_BUY_); }
 if (trendline) { return (OP_SELL_); } else if (hline) { return (OP_SELL_) ; }

일반적으로 위의 줄은 다음과 같이 단순화되고 작성될 수 있습니다.

          if(trendline)return OP_BUY;
          if(hline)    return OP_BUY;
или еще проще
          if(trendline or hline) return OP_BUY;

//+------------------------------------------------------------------+
//|                      Copyright © 2010, MetaQuotes Software Corp. |
//|                             http://www.mql4.com/ru/users/rustein |
//+------------------------------------------------------------------+
#define MAGIC   131313 // открытие внутрь канала
//---------------------------------------
extern int TF= 15 ;
extern int     StopLoss          = 300 ;
extern double TakeProfit = 3000 ;
extern int Per_MA= 20 ;
extern double Lots              = 0.1 ;
extern double MaximumRisk       = 1 ;
extern double DecreaseFactor    = 0 ;

//---- constants
#define OP_BUY_   0
#define OP_SELL_ 1

bool b_1= true , s_1= true ;

//+------------------------------------------------------------------+
//| Calculate open positions                                         |
//+------------------------------------------------------------------+
 double MA= iMA ( NULL ,TF,Per_MA, 0 , 0 , 0 , 1 );
int CalculateCurrentOrders( string symbol)
  {
   int buys= 0 ,sells= 0 ;
//----
   for ( int i= 0 ;i< OrdersTotal ();i++)
     {
       if ( OrderSelect (i, SELECT_BY_POS , MODE_TRADES )== false ) break ;
       if ( OrderSymbol ()== Symbol () && OrderMagicNumber ()==MAGIC)
        {
         if ( OrderType ()== OP_BUY )  buys++;
         if ( OrderType ()== OP_SELL ) sells++;
        }
     }
//---- return orders volume
   if (buys> 0 ) return (buys);
   else        return (-sells);
  }

//+------------------------------------------------------------------+
//| Calculate optimal lot size                                       |
//+------------------------------------------------------------------+
double LotsOptimized()
  {
   double lot=Lots;
   int     orders= HistoryTotal ();     // history orders total
   int     losses= 0 ;                   // number of losses orders without a break
//---- select lot size
   //lot=NormalizeDouble(AccountFreeMargin()*MaximumRisk/1000.0,2);
   lot= NormalizeDouble ( AccountFreeMargin ()*MaximumRisk/ 100 / MarketInfo ( Symbol (), MODE_TICKVALUE )/StopLoss, 2 );

//---- calcuulate number of losses orders without a break
   if (DecreaseFactor> 0 )
     {
       for ( int i=orders- 1 ;i>= 0 ;i--)
        {
         if ( OrderSelect (i, SELECT_BY_POS , MODE_HISTORY )== false ) { Print ( "Error in history!" ); break ; }
         if ( OrderSymbol ()!= Symbol () || OrderType ()> OP_SELL ) continue ;
         //----
         if ( OrderProfit ()> 0 ) break ;
         if ( OrderProfit ()< 0 ) losses++;
        }
       if (losses> 1 ) lot= NormalizeDouble (lot-lot*losses/DecreaseFactor, 2 );
     }
//---- return lot size
   if (lot< 0.01 ) lot= 0.01 ;
   return (lot);
  }
   //-------------------------------------------------

   /* эта часть из индикатора*/
   int CheckBreakoutLines( int shift)
{
   // Total Objects 
   int obj_total = ObjectsTotal ();

   // Time of bar 
   datetime now = Time [shift];

   // Iterate
   for ( int i = obj_total - 1 ; i >= 0 ; i--)
   {
       // Object name
       string label = ObjectName (i);

       // Types
       int OType = ObjectType (label);
       bool trendline = false ;
       bool hline = false ;

       // Price to evaluate
       double cprice = 0 ;

       // Trendlines
       if (OType == OBJ_TREND )
      {
         bool ray = ObjectGet (label, OBJPROP_RAY );
         if (!ray)
         {
             datetime x1 = ObjectGet (label, OBJPROP_TIME1 );
             datetime x2 = ObjectGet (label, OBJPROP_TIME2 );
             if (x1 < now && x2 < now) continue ;
         }
         cprice = GetCurrentPriceOfLine(label, shift);
         trendline = true ;
      } else if (OType == OBJ_HLINE ) {
         cprice = ObjectGet (label, OBJPROP_PRICE1 );
         hline = true ;
      } else {
         continue ;
      }

       // Breakouts and false breakouts of trendlines and hlines
       if (MA>cprice && Ask <cprice)
      {
         if (trendline) { return (OP_BUY_); } else if (hline) { return (OP_BUY_); }
      } else if (MA>cprice && Ask <cprice) {
         if (trendline) { return (OP_SELL_); } else if (hline) { return (OP_SELL_); }    
      }
     }
   return ( EMPTY_VALUE );       
}

double GetCurrentPriceOfLine( string label, int shift)
{
   double price1 = ObjectGet (label, OBJPROP_PRICE1 );
   double price2 = ObjectGet (label, OBJPROP_PRICE2 );
   datetime d1   = ObjectGet (label, OBJPROP_TIME1 );
   datetime d2   = ObjectGet (label, OBJPROP_TIME2 );
   int shiftfrom = iBarShift ( Symbol (), 0 , d1, false );
   int shiftto   = iBarShift ( Symbol (), 0 , d2, false );
   int lapse = MathAbs (shiftto - shiftfrom);
   int distance = MathAbs (shift - shiftfrom);
   double pendiente = (price2 - price1) / lapse;
   double cpoint = price1 + (distance * pendiente);
   return (cpoint);
}
   //-------------------------------------------------------------------------------------------------------------

//+------------------------------------------------------------------+
//| Check for open order conditions                                  |
//+------------------------------------------------------------------+
void CheckForOpen()
  {
   int     res;

//--------------------------------------------------------------------+
//---- buy conditions 
 if (OP_BUY_&&b_1)
     {
      res= OrderSend ( Symbol (), OP_BUY ,LotsOptimized(), Ask , 3 , Ask -(StopLoss* Point ), Ask +TakeProfit* Point , " VV" ,MAGIC, 0 ,Green);
      b_1= false ; s_1= true ; 
       return ;
     }  

//---- sell conditions
     if (OP_SELL_&&s_1)
 {
      res= OrderSend ( Symbol (), OP_SELL ,LotsOptimized(), Bid , 3 , Bid +(StopLoss* Point ), Bid -TakeProfit* Point , " VV" ,MAGIC, 0 ,Red);
        s_1= false ;b_1= true ;
       return ;
     } 
//----
  }

//+------------------------------------------------------------------+
//| Start function                                                   |
//+------------------------------------------------------------------+
void start()
  {
//---- check for history and trading
   if ( Bars < 100 || IsTradeAllowed ()== false ) return ;

//---- calculate open orders by current symbol
   if (CalculateCurrentOrders( Symbol ())== 0 ) CheckForOpen();
  }   

//+------------------------------------------------------------------+
//|---------------------------// END //------------------------------|
//+------------------------------------------------------------------+
 
LRA :

메모장에 프로그램을 로드하고 빈 줄을 삭제했습니다. 살펴보는 기회가 있었습니다. SRC 버튼을 누르고 삽입했습니다. 여기 무슨 일이 있었는지. 1) 정의하는 이유

이미 OP_BUY=0 및 OP_SELL=1이 있는 경우

2) 악의 뿌리는 이 부분에 있다. 동일한 조건(MA>cprice &&Ask<cprice)을 두 번 확인하고 다른 결정을 내립니다.

3) 각 지점에서 추가 검사를 수행하지만 결과는 여전히 동일합니다.

일반적으로 위의 줄은 다음과 같이 단순화되고 작성될 수 있습니다.


답변 감사합니다. 변경했지만 OP_SELL =1 이후로 여전히 SELL만 열립니다. 이 조건은 항상 충족됩니다. 이렇게 바꿨어요

내 의견으로는 주문이 열리지 않음 int CheckBreakoutLines(int shift) 아마도 있어야 할 위치가 아닐 수 있습니까?

 //+------------------------------------------------------------------+
//|                      Copyright © 2010, MetaQuotes Software Corp. |
//|                             http://www.mql4.com/ru/users/rustein |
//+------------------------------------------------------------------+
#define MAGIC   131313 // открытие внутрь канала
//---------------------------------------
extern int TF= 15 ;
extern int     StopLoss          = 300 ;
extern double TakeProfit = 3000 ;
extern int Per_MA= 20 ;
extern double Lots              = 0.1 ;
extern double MaximumRisk       = 1 ;
extern double DecreaseFactor    = 0 ;
bool OP_BUY_= false ;   
bool OP_SELL_ = false ;   

bool b_1= true , s_1= true ;

//+------------------------------------------------------------------+
//| Calculate open positions                                         |
//+------------------------------------------------------------------+
 double MA= iMA ( NULL ,TF,Per_MA, 0 , 0 , 0 , 1 );
int CalculateCurrentOrders( string symbol)
  {
   int buys= 0 ,sells= 0 ;
//----
   for ( int i= 0 ;i< OrdersTotal ();i++)
     {
       if ( OrderSelect (i, SELECT_BY_POS , MODE_TRADES )== false ) break ;
       if ( OrderSymbol ()== Symbol () && OrderMagicNumber ()==MAGIC)
        {
         if ( OrderType ()== OP_BUY )  buys++;
         if ( OrderType ()== OP_SELL ) sells++;
        }
     }
//---- return orders volume
   if (buys> 0 ) return (buys);
   else        return (-sells);
  }

//+------------------------------------------------------------------+
//| Calculate optimal lot size                                       |
//+------------------------------------------------------------------+
double LotsOptimized()
  {
   double lot=Lots;
   int     orders= HistoryTotal ();     // history orders total
   int     losses= 0 ;                   // number of losses orders without a break
//---- select lot size
   //lot=NormalizeDouble(AccountFreeMargin()*MaximumRisk/1000.0,2);
   lot= NormalizeDouble ( AccountFreeMargin ()*MaximumRisk/ 100 / MarketInfo ( Symbol (), MODE_TICKVALUE )/StopLoss, 2 );
//---- calcuulate number of losses orders without a break
   if (DecreaseFactor> 0 )
     {
       for ( int i=orders- 1 ;i>= 0 ;i--)
        {
         if ( OrderSelect (i, SELECT_BY_POS , MODE_HISTORY )== false ) { Print ( "Error in history!" ); break ; }
         if ( OrderSymbol ()!= Symbol () || OrderType ()> OP_SELL ) continue ;
         //----
         if ( OrderProfit ()> 0 ) break ;
         if ( OrderProfit ()< 0 ) losses++;
        }
       if (losses> 1 ) lot= NormalizeDouble (lot-lot*losses/DecreaseFactor, 2 );
     }
//---- return lot size
   if (lot< 0.01 ) lot= 0.01 ;
   return (lot);
  }
   //-------------------------------------------------

   /* эта часть из индикатора*/
   int CheckBreakoutLines( int shift)
{
   // Total Objects 
   int obj_total = ObjectsTotal ();
   // Time of bar 
   datetime now = Time [shift];
   // Iterate
   for ( int i = obj_total - 1 ; i >= 0 ; i--)
   {
       // Object name
       string label = ObjectName (i);
       // Types
       int OType = ObjectType (label);
       bool trendline = false ;
       bool hline = false ;
       // Price to evaluate
       double cprice = 0 ;
       // Trendlines
       if (OType == OBJ_TREND )
      {
         bool ray = ObjectGet (label, OBJPROP_RAY );
         if (!ray)
         {
             datetime x1 = ObjectGet (label, OBJPROP_TIME1 );
             datetime x2 = ObjectGet (label, OBJPROP_TIME2 );
             if (x1 < now && x2 < now) continue ;
         }
         cprice = GetCurrentPriceOfLine(label, shift);
         trendline = true ;
      } else if (OType == OBJ_HLINE ) {
         cprice = ObjectGet (label, OBJPROP_PRICE1 );
         hline = true ;
      } else {
         continue ;
      }
       // Breakouts and false breakouts of trendlines and hlines
       if (MA>cprice && Ask <cprice)
      {OP_BUY_= true ;
         if (trendline ||hline)   return (OP_BUY_); 
      } else if (MA<cprice && Bid >cprice) {OP_SELL_ = true ;
         if (trendline ||hline)   return (OP_SELL_);     
      }
     }
   return ( EMPTY_VALUE );       
}

double GetCurrentPriceOfLine( string label, int shift)
{
   double price1 = ObjectGet (label, OBJPROP_PRICE1 );
   double price2 = ObjectGet (label, OBJPROP_PRICE2 );
   datetime d1   = ObjectGet (label, OBJPROP_TIME1 );
   datetime d2   = ObjectGet (label, OBJPROP_TIME2 );
   int shiftfrom = iBarShift ( Symbol (), 0 , d1, false );
   int shiftto   = iBarShift ( Symbol (), 0 , d2, false );
   int lapse = MathAbs (shiftto - shiftfrom);
   int distance = MathAbs (shift - shiftfrom);
   double pendiente = (price2 - price1) / lapse;
   double cpoint = price1 + (distance * pendiente);
   return (cpoint);
}
   //-------------------------------------------------------------------------------------------------------------

//+------------------------------------------------------------------+
//| Check for open order conditions                                  |
//+------------------------------------------------------------------+
void CheckForOpen()
  {
   int     res;

//--------------------------------------------------------------------+
//---- buy conditions 
 if (OP_BUY_&&b_1)
     {
      res= OrderSend ( Symbol (), OP_BUY ,LotsOptimized(), Ask , 3 , Ask -(StopLoss* Point ), Ask +TakeProfit* Point , " VV" ,MAGIC, 0 ,Green);
      b_1= false ; s_1= true ; 
       return ;
     }  

//---- sell conditions
     if (OP_SELL_ &&s_1)
 {
      res= OrderSend ( Symbol (), OP_SELL ,LotsOptimized(), Bid , 3 , Bid +(StopLoss* Point ), Bid -TakeProfit* Point , " VV" ,MAGIC, 0 ,Red);
        s_1= false ;b_1= true ;
       return ;
     } 
//----
  }

//+------------------------------------------------------------------+
//| Start function                                                   |
//+------------------------------------------------------------------+
void start()
  {
//---- check for history and trading
   if ( Bars < 100 || IsTradeAllowed ()== false ) return ;
//---- calculate open orders by current symbol
   if (CalculateCurrentOrders( Symbol ())== 0 ) CheckForOpen();
  }   

//+------------------------------------------------------------------+
//|---------------------------// END //------------------------------|
//+------------------------------------------------------------------+
Warstein
Warstein
  • www.mql5.com
Профиль трейдера
 

친애하는 전문가들. 설치 전, MT4 설치 중 또는 설치 후에 수행해야 하는 작업은 나중에 시스템 디스크가 아닌 다른 디스크에서 따옴표 기록을 쓰거나 읽도록 하려면, 아니면 불가능합니까?

모든 브로커의 MT4는 C:\Users\MAN\AppData\Roaming\MetaQuotes\Terminal\100.......001\history\downloads(각각 브로커 및 각 터미널에 대해)에 모든 것을 덤프합니다. 3-4 쌍에 대한 두 브로커의 두 MT4는 25GB, 즉 모든 여유 메모리를 먹었습니다. 같은 자리에 테스터 C:\Users\.......\tester\history에 테스터 중 필요한 따옴표가 로드됩니다.

디스크 크기 재분배와 함께 Windows(7이 있음) 재설치를 고려하지 않은 조언을 도와주세요. 내가 뭔가 잘못하고 있는 건 아닐까? 내가 그것을 놓쳤고 이것은 이미 어딘가에서 논의된 적이 있다면 링크를 던져주세요 ...

미리 감사드립니다.

 
piranija :

친애하는 전문가들. 설치 전, MT4 설치 중 또는 설치 후에 수행해야 하는 작업은 나중에 시스템 디스크가 아닌 다른 디스크에서 따옴표 기록을 쓰거나 읽도록 하려면, 아니면 불가능합니까?

모든 브로커의 MT4는 C:\Users\MAN\AppData\Roaming\MetaQuotes\Terminal\100.......001\history\downloads(각각 브로커 및 각 터미널에 대해)에 모든 것을 덤프합니다. 3-4 쌍에 대한 두 브로커의 두 MT4는 25GB, 즉 모든 여유 메모리를 먹었습니다. 같은 자리에 테스터 C:\Users\.......\tester\history에 테스터 중 필요한 따옴표가 로드됩니다.

디스크 크기 재분배와 함께 Windows(7이 있음) 재설치를 고려하지 않은 조언을 도와주세요. 내가 뭔가 잘못하고 있는 건 아닐까? 내가 그것을 놓쳤고 이것은 이미 어딘가에서 논의된 적이 있다면 링크를 던져주세요 ...

미리 감사드립니다.

단순 복사로 단말기의 전체 폴더를 비시스템 드라이브로 옮기고, 바로가기를 생성하고 /portable 키를 작성


사유: