거래 로봇을 무료로 다운로드 하는 법을 시청해보세요
당사를 Telegram에서 찾아주십시오!
당사 팬 페이지에 가입하십시오
스크립트가 흥미로우신가요?
그렇다면 링크 to it -
하셔서 다른 이들이 평가할 수 있도록 해보세요
스크립트가 마음에 드시나요? MetaTrader 5 터미널에서 시도해보십시오
라이브러리

Matrix operations library - MetaTrader 5용 라이브러리

조회수:
5037
평가:
(32)
게시됨:
2011.10.28 12:56
업데이트됨:
2016.11.22 07:32
\MQL5\Include\
matrix.mqh (8.81 KB) 조회
\MQL5\Scripts\
MQL5 프리랜스 이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

The library provides simple matrix operations: addition, subtraction, multiplication, inversion.

The matrix.mqh must be placed to terminal_data_folder/MQL5/Include/.

Simple example:

Find the inverted matrix for matrix: F3=((F1+F2)*F2)/10-F2.

F1 and F2 are 3х3 matricies.

#include <Matrix.mqh> 
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
//---
   CMatrix          *F1;
   CMatrix          *F2;
   CMatrix          *F3;

   F1=new CMatrix(3,3);
   F2=new CMatrix(3,3);
   F3=new CMatrix(3,3);

   El(F1,0,0)=1;  El(F1,0,1)=4;  El(F1,0,2)=-2;
   El(F1,1,0)=-3; El(F1,1,1)=2;  El(F1,1,2)=2;
   El(F1,2,0)=1;  El(F1,2,1)=0;  El(F1,2,2)=-2;

   El(F2,0,0)=2;  El(F2,0,1)=2;  El(F2,0,2)=-3;
   El(F2,1,0)=-1; El(F2,1,1)=1;  El(F2,1,2)=7;
   El(F2,2,0)=3;  El(F2,2,1)=2;  El(F2,2,2)=10;

   F3.Add(F1,F2); // F3=F1+F2
   F3.Mul(F2);    // F3=F3*F2
   F3.Mul(1./10); // F3=F3/10
   F3.Sub(F2);    // F3=F3-F2

   double det=F3.Inv();  // Invert F3
   printf("det=%5.3f   F3[2,2]=%5.3f",det,El(F3,2,2));
   delete F1;
   delete F2;
   delete F3;
  }

Experts log output:

det=6.624   F3[2,2]=0.548


MetaQuotes Ltd에서 러시아어로 번역함.
원본 코드: https://www.mql5.com/ru/code/601

XVSI XVSI

The indicator that calculates the volume corresponding to MA per second (or period).

Mass Index Mass Index

The Mass Index was popularized by Tushar Chande and Donald Dorsey.

XRAVI XRAVI

Range Action Verification Index trend indicator.

Cronex Super Position Cronex Super Position

Superposition of RSI and DeMarker technical indicators.