Initial commit: MQL5 Scripts Collection (MetaTrader 5)
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
# 🚀 Unlock the Power of Trading!
|
||||
|
||||
Welcome to this open-source trading project. Here you will find powerful tools to enhance your trading journey. If you find this project useful, please consider starring ⭐, sharing, or donating to support further development!
|
||||
|
||||
---
|
||||
|
||||
**Support the project:**
|
||||
- Star this repository on GitHub
|
||||
- Share it with your trading friends
|
||||
- [Donate here](https://www.paypal.com/donate/?hosted_button_id=YOUR_BUTTON_ID) to help us grow!
|
||||
|
||||
---
|
||||

|
||||
|
||||
## Source Files
|
||||
- `lotloss.mq5`
|
||||
|
||||
---
|
||||
> Made with ❤️ for the trading community.
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
@@ -0,0 +1,26 @@
|
||||
#property copyright "Mokara"
|
||||
#property link "https://www.mql5.com/en/users/mokara"
|
||||
#property description "LotLoss"
|
||||
#property version "1.0"
|
||||
#property script_show_inputs
|
||||
|
||||
input int vLoss = 50; //Risk Money
|
||||
input int pLoss = 500; //Stop-Loss Points
|
||||
|
||||
void OnStart()
|
||||
{
|
||||
double pValue = SymbolInfoDouble(NULL, SYMBOL_TRADE_TICK_VALUE_PROFIT);
|
||||
double Lots = vLoss / (pLoss * pValue);
|
||||
|
||||
if(Lots < 0.01)
|
||||
{
|
||||
Print("Error: under micro lots.");
|
||||
return;
|
||||
}
|
||||
|
||||
string Message = "Point Value: " + DoubleToString(pValue, 2) + "\n" +
|
||||
"Point: " + DoubleToString(_Point, _Digits) + "\n" +
|
||||
"Lots: " + DoubleToString(Lots, 2);
|
||||
|
||||
MessageBox(Message, "LotLoss v1.0", MB_ICONINFORMATION|MB_OK);
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
Reference in New Issue
Block a user