//Get last Loss
if (Performance.AllTrades.LosingTrades.Count > 1)
{
Trade lastTrade = Performance.AllTrades.LosingTrades[Performance.AllTrades.Count - 1];
Trade firstTrade = Performance.AllTrades.LosingTrades[0];
DrawText("P&L" + CurrentBar, true, "LastLost Profit: " + lastTrade.ProfitCurrency.ToString(), 0,( Close[0] + (10 * TickSize)), 1, Color.Cyan, new Font ("Arial", 11, FontStyle.Bold), StringAlignment.Center, Color.Transparent, Color.Transparent, 0);
Print("The last losing trade's profit was " + lastTrade.ProfitPercent);
Print("The first losing trade's profit was " + firstTrade.ProfitPercent);
}
I attached the a simple CrossOver strategy. please check it out.
thanks

Comment