Trabalho concluído
![](https://c.mql5.com/i/avatar/avatar_na2.png)
![](https://c.mql5.com/i/avatar/avatar_na2.png)
Termos de Referência
I require a code that creates a set of global variables that can be called by other parts of an EA that acheives the following:
Calculates the PIP values of the last consecutive loss trades
Calculates the NUMBER of last consecutive loss trades
Calculates the dollar amount of the last consecutive loss trades - dynamic based on the currency pair
Examples:
Trades at 0.1 Lots : -6, +10, -5, -5: Outputs: 10 + X (Pips), 2 (Trades), -$10 (USD)
Trades at 0.1 Lots : -6, +10, -5: Outputs: 5 + X (Pips), 1 (Trades), -$5 (USD)
Trades at 0.1 Lots : -6, +10: Outputs: X (Pips), 0 (Trades), +10 (USD)
X is a PIP value that I can enter
I need two sets of files, 1 file that only contains the Pip and number of trades. The second file that contains the dollar value.
The code needs to be able to isolate an EA based on its Magic Number
Require the code as an MQ4 file, and needs to be clean and annotated.
I will need to insert this code into various different EA's, so the entire code apart from the declaration of the global variables needs to sit inside ONE function.
I will be testing the code, so will need to work regardless of the EA it sits in.
Thanks