無料でロボットをダウンロードする方法を見る
Twitter上で私たちを見つけてください。
私たちのファンページに参加してください
興味深いスクリプト?
それではリンクにそれを投稿してください。-
他の人にそれを評価してもらいます
記事を気に入りましたか?MetaTrader 5ターミナルの中でそれを試してみてください。
ライブラリ

VATicks - MetaTrader 4のためのライブラリ

ビュー:
9235
評価:
(28)
パブリッシュ済み:
2016.10.27 13:41
\MQL4\Include\
このコードに基づいたロボットまたはインジケーターが必要なら、フリーランスでご注文ください フリーランスに移動

Class for working with ticks in the MetaTrader 4. It is suitable for creating experts that make decisions on trading based on the analysis of tick data.

The class can calculate:

  • Price movement speed;
  • Price acceleration;
  • Distance passed by the price;
  • Price movement direction;
  • Distance the price may pass based on acceleration.

Example of using the class in an expert.

#include <VATicks.mqh>

CTicks Tick;
int index;
int oldindex;
double V0;
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
{
   index = 15;
   oldindex = 0;
   V0 = 0;
   return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
{
   
}
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
{
   Tick.Tick(Bid);  
   int count = Tick.TickCount();
   if (count==index) 
   {
      int T = Tick.TickTime(oldindex,count);
      Print("Time for 15 ticks = ",T," s");
      double S = Tick.Length(oldindex,count);
      Print("Distance for 15 ticks = ",T," s");
      double V = Tick.Speed(oldindex,count);
      Print("Speed for 15 ticks = ",T," s");
      double A = Tick.Acceleration(oldindex,count);
      Print("Acceleration for 15 ticks = ",T," s");
      double Sr = Tick.EstimatedPath(oldindex,count,V0);
      Print("Can still pass (estimated distance based on acceleration) ",Sr," point ");
      int tr=Tick.Trend(oldindex,count);
      if (tr==TREND_BUY)  Print("Direction for 15 ticks is up");
      if (tr==TREND_SELL)  Print("Direction for 15 ticks is down");
      if (tr==TREND_NO)  Print("Direction for 15 ticks is none");
      oldindex=index;
      index+=16;
      V0 = V;
   }   
}

MetaQuotes Ltdによってロシア語から翻訳されました。
元のコード: https://www.mql5.com/ru/code/16154

Cauchy derivative Cauchy derivative

Derivative of the Cauchy difference

Cauchy difference Cauchy difference

Cauchy difference.

Indicator for monitoring the lot and profit Indicator for monitoring the lot and profit

The indicator displays the total lot and profit for the current instrument.

Price_Compare Price_Compare

Elegant and nimble comparison of 'double' values of the "price".