Why AllTrades (without //) prints the "P" when cumulative profit is negative, but RealtimeTrades (in red) do not print "P" when current trade is presenting a loss?
What RealtimeTrades performance shows? Is the P&L of open positions (real time)?
How can I print "something" when a position is losing money?
if (ToTime(Time[0]) >= beginOpenTrading && ToTime(Time[0]) <= stopOpenTrading)
{
//if (Performance.AllTrades.TradesPerformance.Currency. CumProfit < 0)
if (Performance.RealtimeTrades.TradesPerformance.Curr ency.CumProfit < 0)
{
DrawText(CurrentBar+"1","P",0,High[0],Color.Blue);
}
Another question would be, How can I print inside OnBarUpdate()?
Something like: Print("Average MAE of all trades is: " +
Performance.AllTrades.TradesPerformance.Currency.
AvgMae);
I use it inside OnBarUpdate but nothing happen..

Comment