私たちのファンページに参加してください
- ビュー:
- 31
- 評価:
- パブリッシュ済み:
- 2025.04.03 11:15
-
このコードに基づいたロボットまたはインジケーターが必要なら、フリーランスでご注文ください フリーランスに移動
この小さなクロスプラットフォーム・ライブラリを使えば、「価格」の二重値を非常に迅速かつ便利に比較 することができます。
例えば、SellLimitを設定する際に、始値が現在のBid価格より低くないかどうかをチェックするのに便利です。
// if (NormalizeDouble(OpenPrice, Digits()))>= NormalizeDouble(Bid, Digits()))// この手法が最もよく使われた if (CP(OpenPrice) >= Bid) // 今度は違う方法で OrderSend...;
標準的なチェックよりもはるかに視覚的で簡潔なだけではありません。しかし、実行速度も何倍も速くなる!このように計算資源を合理的に使用することで、テスター/オプティマイザーが顕著にスピードアップすることがあります。
二重値を比較する際に精度を設定することも可能です。例えば
if ((CP(Lots, 0.01) >= MinLot) && ((CP(Lots, 0.01) <= MaxLot))) // 小数点第2位までの比較 OrderSend...;
すべての比較演算子 (==, !=, >=, <=, >, <=, >, <) は同じように動作します。
ライブラリには、NormalizeDoubleの 高速な実装があります。標準関数の実行を高速化するには、関数の先頭に次のように書けばよい。
// 対応する標準関数(ビルド 1395)よりもほぼ 4 倍速い。 #define NormalizeDouble PRICE_COMPARE::MyNormalizeDouble
例として、異なる価格値に対する比較と正規化の結果を示すスクリプトを添付します。
MetaQuotes Ltdによってロシア語から翻訳されました。
元のコード: https://www.mql5.com/ru/code/16177

This Expert Advisor (EA) analyzes market movement by calculating the average pip movement per tick and the average spread over a user-defined number of ticks (MAX_TICKS). It also evaluates the average pip movement and spread over a specified time interval (CHECK_SECONDS). The EA dynamically tracks price changes and spread values, printing the results in the terminal and displaying them on the chart using the Comment() function. This helps traders gauge market volatility and spread fluctuations in real time.

This is a piece of code to add to an existing Expert advisor to track withdrawals from your account where the EA is running. It helps the user to monitor his or her withdrawals from a particular account.

MetaCOT 2 CFTC ToolBox Indicatorsは、CFTCレポートからのデータへのアクセスを提供するMetaCOT 2インジケーターのセットです。MetaCOT 2はCOT、Disaggregated COT、TFF、CITレポートをサポートし、MetaTraderで直接COTチャートを構築することができます。全てのインジケータはソースコードで利用可能で、独自の取引システムを構築するために使用することができます。

Original ZigZag MT4 with added automatic fibonacci