Author: Mokara
Miscellaneous
It opens Message Boxes to the user
0 Views
0 Downloads
0 Favorites
LotLoss
#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);
}

Comments

Markdown supported. Formatting help

Markdown Formatting Guide

Element Markdown Syntax
Heading # H1
## H2
### H3
Bold **bold text**
Italic *italicized text*
Link [title](https://www.example.com)
Image ![alt text](image.jpg)
Code `code`
Code Block ```
code block
```
Quote > blockquote
Unordered List - Item 1
- Item 2
Ordered List 1. First item
2. Second item
Horizontal Rule ---