거래 로봇을 무료로 다운로드 하는 법을 시청해보세요
당사를 Twitter에서 찾아주십시오!
당사 팬 페이지에 가입하십시오
당사 팬 페이지에 가입하십시오
스크립트가 마음에 드시나요? MetaTrader 5 터미널에서 시도해보십시오
- 조회수:
- 8983
- 평가:
- 게시됨:
- 2008.11.18 09:22
- 업데이트됨:
- 2016.04.05 14:49
-
이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동
Parameters:
- riskPercent - percent of the current balance you want to risk
- sl - the value of the StopLoss for the given order
- price - the open price of the order
- error - refereced parameter. an error code, that is returned by the function
Note: I can't say that it works correctly. I've checked it approximately. So your comments are appreciated.
Here is an example:
int riskPercentage = 3, error; double sl = Ask - 40 * Point, openPrice = Ask; double lots = GetNeccessaryLotsWithRisk(riskPercentage, sl, openPrice, error); if (CompareDoubles(lots, 0)) { switch (error) { case LOTS_TOO_BIG: // lots are bigger than max lots Alert("Risk percentage is too big"); break; case LOTS_TOO_SMALL: // lots are smaller than min lots Alert("Risk percentage is too small"); break; default: // formula's result =) Alert("It seems like you've got $0 or stoploss is too far"); break; } }
MetaQuotes Ltd에서 러시아어로 번역함.
원본 코드: https://www.mql5.com/ru/code/8568
![mysqlerror.mqh](https://c.mql5.com/i/code/library.png)
A library of MySQL 5.0 error codes If you use a connection to the MySQL database in your EA, indicator or script and it doesn't work or something goes wrong then this library will allow you to find out what error is returned by the MySQL database.
![MTS Neural network plus MACD](https://c.mql5.com/i/code/expert.png)
A variation on the Neuro nets topic: The trading system based on the interaction of the MACD indicator and a double-layer neuro net.
![Indicator Volumes Buy-Sell](https://c.mql5.com/i/code/indicator.png)
This indicator signal buys and sell in the market.
![Lagrange's Interpolation Polynomial](https://c.mql5.com/i/code/indicator.png)
The application of Lagrange's interpolation polynomial at FOREX.