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

MM % volatility - MetaTrader 4のためのスクリプト

ビュー:
12891
評価:
(13)
パブリッシュ済み:
2016.04.26 16:35
Buy.mq4 (0.45 KB) ビュー
Sell.mq4 (0.45 KB) ビュー
Trade.mq4 (3.22 KB) ビュー
\MQL4\Include\
Trade.mqh (0.51 KB) ビュー
このコードに基づいたロボットまたはインジケーターが必要なら、フリーランスでご注文ください フリーランスに移動

Lot calculation and position opening by market with the consideration of the asset volatility. StopLoss is set automatically, TakeProfit - on demand, as a multiple of R.

LotSize:=RiskAmount/(PointPrice*StopLossPoints);
RiskAmount:=FreeMargin*RiskPercent/100;
StopLossPoints:=kATR*ATR(TimeFrame,RiskAtrPeriod)/PointSize;
TakeProfitPoints:=StopLossPoints*ProfitToLossRatio.

The working function is Trade, in the Trade.mq4 library file. Declaration:

int Trade(string smb, int TimeFrame, int cmd, bool ShowQ, int Slippage, bool SetProfit, double MaxRiskPercent, int RiskAtrPeriod, double RiskMulATR, double ProfitToLossRatio), where:

smb - name of the asset;
TimeFrame - used to determine the StopLossPoints;
cmd - OP_BUY or OP_SELL;
ShowQ - display the dialog asking confirmation (False - no dialog);
Slippage - slippage in points;
SetProfit - if True - the TakeProfit will be specified in the orders;
MaxRiskPercent - % FreeMargin, allowed to risk (2% - classic, 5% - aggressive, higher - based on luck);
RiskAtrPeriod - the number of last bars to calculate the true range (21 is sufficient);
RiskMulATR - to determine the StopLossPoints;
ProfitToLossRatio - multiplicity of R (for example, 5).

Attached scripts:
Buy.mq4/Sell.mq4 - buy/sell the current asset, timeframe, with confirmation dialog, slippage of 1 point, 2% risk, RiskAtrPeriod=21, RiskMulATR=1, ProfitToLossRatio=10;
Buy_nonQuery.mq4/Sell_nonQuery.mq4 - the same settings, but without the dialog and with slippage=0.

How to install:
Trade.mqh - copy to the 'include' subdirectory of the 'experts' directory of the MetaTrader root folder;
Trade.mq4 - copy to the 'libraries' subdirectory of the 'experts' directory of the MetaTrader root folder and compile;
Buy.mq4, Buy_nonQuery.mq4, Sell.mq4, Sell_nonQuery.mq4 - copy to the 'scripts' subdirectory of the 'experts' directory of the MetaTrader root folder and compile.

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

ModiSimple ModiSimple

Simple tactics using RSI and MACD

TrailCD TrailCD

The indicator shows convergence/divergence of the fast and slow trailing.

DynamicRS_C DynamicRS_C

The indicator plots dynamic support and resistance levels.

The HighLowWeek library The HighLowWeek library

Displays the levels of the current week!