Skip navigation.
Home
Metatrader community - Forex Trading with Metatrader

Scripts - History!

Hi folks,

One of forex-tsd forum members asked me for a price of code to check if last [closed] trade was a win or lose, That's why I've wrote this script (you can copy-paste the function you want to the expert advisor you are wiring).

The script has 5 self-explained functions:

GetLastProfit:

This is the function my friend has asked for, it returns the last closed trade profit or loss.

GetBiggestProfit:

This function returns the biggest profit of the closed trades.

GetBiggestLoss:

This function returns the biggest loss of the closed trades.

GetProfitNumber:

This function returns the number of profit trades of the closed trades.

GetLossNumber:

This function returns the number of loss trades of the closed trades.