i find a strange situation in Strategy
This is a lists of my trade:
If i check on my log i see
Trade Number 1
Entry Time 02/01/2023 15:50:00
Profit pips 151,500000000004
Profit monetary 0,0151500000000004
Why profit monetary is 0,01515 and not in currency and why profit in pips it seems in currency?
This is my function:
double CheckLastOrderProfit()
{
var Trades1 = SystemPerformance.AllTrades;
TradeCollection Trades = SystemPerformance.AllTrades.GetTrades(Instrument.F ullName, Name, 1);
if (Trades.Count()>0)
{
Trade LastTrades = Trades.Last();
WriteToFile("Trade Number " + LastTrades.TradeNumber.ToString() +1, @"C:\temp" + Instrument.FullName + ".log");
WriteToFile("Entry Time " + LastTrades.Entry.Time.ToString(), @"C:\temp" + Instrument.FullName + ".log");
WriteToFile("Profit pips " + LastTrades.ProfitPips.ToString(), @"C:\temp" + Instrument.FullName + ".log");
WriteToFile("Profit monetary " + LastTrades.ProfitCurrency.ToString(), @"C:\temp" + Instrument.FullName + ".log");
return LastTrades.ProfitCurrency;
}
return 0;
}
Best Regards
Davide

Comment