기고글 토론 "MQL4에서 MQL5로 이전하기" - 페이지 9

 
Sergey Pavlov:

기사와 동시에 만들어졌습니다. 하지만 거래 기능이 없으면 의미가 없습니다!

저는 MQL5 거래 기능과 동시에 작동하는 MQL4 거래기능을 만들었습니다 (kodobase에 게시).

따라서 에뮬레이터는 여전히 의미가 있을 수 있습니다.

 
fxsaber:

MQL5 거래 기능과 동시에 작동하는 MQL4 거래기능을 만들었습니다(kodobase에 업로드했습니다).

따라서 에뮬레이터에서 여전히 감각이 있을 수 있습니다.

https://www.mql5.com/ko/code/16006
MT4Orders
MT4Orders
  • 2016.08.05
  • fxsaber
  • www.mql5.com
Параллельное использование ордерных систем MetaTrader 4 и MetaTrader 5.
 

주제에 대해 자세히 알아보세요.

MQL's OOP notes: Converting MetaTrader 4 indicators to MetaTrader 5
MQL's OOP notes: Converting MetaTrader 4 indicators to MetaTrader 5
  • 2016.09.28
  • //www.mql5.com/en/users/marketeer">
  • www.mql5.com
It has been a long time since MetaTrader 5 was released, but MQL products for MetaTrader 4 do still prevail on mql5.com site (both in the codebase, and in the market), and in the Internet in general....
 
buh400:
이 문제가 이미 제기된 적이 있어서 다른 글을 읽어야 한다는 것을 깨달았습니다:) 내 게시물을 삭제할 수 있습니다.

무엇을 깨달았는지, 어떤 기사를 읽어야하는지, 위의 오류를 수정하는 방법을 알려주세요.

여기에서 나는 그것이 사용자가 지표를 추가하기위한 것임을 이해합니다-그것이 내가 댓글을 단 이유입니다 ...
 
MT4Orders
MT4Orders
  • 투표: 27
  • 2016.10.10
  • fxsaber
  • www.mql5.com
Parallel use of the MetaTrader 4 and MetaTrader 5 order systems.
 

모든 것이

MQLInfoInteger(MQL5_....


MQLInfoInteger(MQL_
 

수정하십시오

bool IsTesting()
bool MQLInfoInteger(MQL5_TESTING)
IsTesting
전문가 어드바이저가 테스트 모드에서 실행 중이면 TRUE를 반환하고, 그렇지 않으면 FALSE를 반환합니다.
MQLInfoInteger

bool IsTesting()
  MQLInfoInteger(MQL_TESTER)
IsTesting
전문가 어드바이저가 테스트 모드에서 실행 중이면 TRUE를 반환하고, 그렇지 않으면 FALSE를 반환합니다.
MQLInfoInteger

MQL5_TESTING dont work please change it to  MQL_TESTER.
IsTesting - Checkup - MQL4 Reference
IsTesting - Checkup - MQL4 Reference
  • docs.mql4.com
IsTesting - Checkup - MQL4 Reference
 
Enum MAIN_SIGNAL_MODE { MODE_MAIN , MODE_SIGNAL}; 

enum ADX_MODE        { MODE_MAIN,         MODE_PLUSDI, MODE_MINUSDI };

2 동일한 정의 생성 오류 이 오류를 수정하세요.
 

아이바시프트가 작동하지 않습니다.

내 실행 - 확실하지는 않지만 올바르게 작동하고 이해가 되는 것 같습니다.

int iBarShift(string symbol,int tf,datetime time,bool exact=false)
  {
   if(time<0) return(-1);
   ENUM_TIMEFRAMES timeframe=TFMigrate(tf);
   datetime Arr[],time1;
   CopyTime(symbol,timeframe,0,1,Arr);
   time1=Arr[0];
   if(time1<time){
      return(0); /// 주어진 시간이 바 오픈 시간보다 짧은 경우
   }
   if(CopyTime(symbol,timeframe,time,time1,Arr)>0)
     {
      return(ArraySize(Arr));
     }
   else return(-1);
  }
 

함수 사용 방법을 이해할 수 없습니다.

bool ObjectSetMQL4(string name,
                   int index,
                   double value)
  {
   switch(index)
     {
      case OBJPROP_TIME1:
         ObjectSetInteger(0,name,OBJPROP_TIME,(int)value);return(true);
      case OBJPROP_PRICE1:
         ObjectSetDouble(0,name,OBJPROP_PRICE,value);return(true);
      case OBJPROP_TIME2:
         ObjectSetInteger(0,name,OBJPROP_TIME,1,(int)value);return(true);
      case OBJPROP_PRICE2:
         ObjectSetDouble(0,name,OBJPROP_PRICE,1,value);return(true);
      case OBJPROP_TIME3:
         ObjectSetInteger(0,name,OBJPROP_TIME,2,(int)value);return(true);
      case OBJPROP_PRICE3:
         ObjectSetDouble(0,name,OBJPROP_PRICE,2,value);return(true);
      case OBJPROP_COLOR:
         ObjectSetInteger(0,name,OBJPROP_COLOR,(int)value);return(true);
      case OBJPROP_STYLE:
         ObjectSetInteger(0,name,OBJPROP_STYLE,(int)value);return(true);
      case OBJPROP_WIDTH:
         ObjectSetInteger(0,name,OBJPROP_WIDTH,(int)value);return(true);
      case OBJPROP_BACK:
         ObjectSetInteger(0,name,OBJPROP_BACK,(int)value);return(true);
      case OBJPROP_RAY:
         ObjectSetInteger(0,name,OBJPROP_RAY_RIGHT,(int)value);return(true);
      case OBJPROP_ELLIPSE:
         ObjectSetInteger(0,name,OBJPROP_ELLIPSE,(int)value);return(true);
      case OBJPROP_SCALE:
         ObjectSetDouble(0,name,OBJPROP_SCALE,value);return(true);
      case OBJPROP_ANGLE:
         ObjectSetDouble(0,name,OBJPROP_ANGLE,value);return(true);
      case OBJPROP_ARROWCODE:
         ObjectSetInteger(0,name,OBJPROP_ARROWCODE,(int)value);return(true);
      case OBJPROP_TIMEFRAMES:
         ObjectSetInteger(0,name,OBJPROP_TIMEFRAMES,(int)value);return(true);
      case OBJPROP_DEVIATION:
         ObjectSetDouble(0,name,OBJPROP_DEVIATION,value);return(true);
      case OBJPROP_FONTSIZE:
         ObjectSetInteger(0,name,OBJPROP_FONTSIZE,(int)value);return(true);
      case OBJPROP_CORNER:
         ObjectSetInteger(0,name,OBJPROP_CORNER,(int)value);return(true);
      case OBJPROP_XDISTANCE:
         ObjectSetInteger(0,name,OBJPROP_XDISTANCE,(int)value);return(true);
      case OBJPROP_YDISTANCE:
         ObjectSetInteger(0,name,OBJPROP_YDISTANCE,(int)value);return(true);
      case OBJPROP_FIBOLEVELS:
         ObjectSetInteger(0,name,OBJPROP_LEVELS,(int)value);return(true);
      case OBJPROP_LEVELCOLOR:
         ObjectSetInteger(0,name,OBJPROP_LEVELCOLOR,(int)value);return(true);
      case OBJPROP_LEVELSTYLE:
         ObjectSetInteger(0,name,OBJPROP_LEVELSTYLE,(int)value);return(true);
      case OBJPROP_LEVELWIDTH:
         ObjectSetInteger(0,name,OBJPROP_LEVELWIDTH,(int)value);return(true);

      default: return(false);
     }
   return(false);
  }

컴파일러가 경고합니다.

'OBJPROP_TIME1' - 선언되지 않은 식별자 TZ_Sky_and_Ground_V_04.mq5 2891 12
'OBJPROP_TIME1' - 상수 표현식 필요 TZ_Sky_and_Ground_V_04.mq5 2891 12
'OBJPROP_PRICE1' - 선언되지 않은 식별자 TZ_Sky_and_Ground_V_04.mq5 2893 12
'OBJPROP_PRICE1' - 상수 표현식 필요 TZ_Sky_and_Ground_V_04.mq5 2893 12
'OBJPROP_TIME2' - 선언되지 않은 식별자 TZ_Sky_and_Ground_V_04.mq5 2895 12
'OBJPROP_TIME2' - 상수 표현 필요 TZ_Sky_and_Ground_V_04.mq5 2895 12
'OBJPROP_PRICE2' - 선언되지 않은 식별자 TZ_Sky_and_Ground_V_04.mq5 2897 12
'OBJPROP_PRICE2' - 상수 표현식 필요 TZ_Sky_and_Ground_V_04.mq5 2897 12
'OBJPROP_TIME3' - 선언되지 않은 식별자 TZ_Sky_and_Ground_V_04.mq5 2899 12
'OBJPROP_TIME3' - 상수 표현식 필요 TZ_Sky_and_Ground_V_04.mq5 2899 12
'OBJPROP_PRICE3' - 선언되지 않은 식별자 TZ_Sky_and_Ground_V_04.mq5 2901 12
'OBJPROP_PRICE3' - 상수 표현식 필요 TZ_Sky_and_Ground_V_04.mq5 2901 12