Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Backtesting problem with Profit in currency

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Strategy Backtesting problem with Profit in currency

    Hi All,
    i find a strange situation in Strategy
    This is a lists of my trade:

    Click image for larger version  Name:	immagine.png Views:	0 Size:	72.4 KB ID:	1232284​​

    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


    #2
    Hello Davide,

    Thank you for your note.

    If you open up the Display dropdown menu in the top-left corner, what do you have selected for the display units? If you change this to currency, does it display currency as expected? Here is a screenshot example:
    World's leading screen capture + recorder from Snagit + Screencast by Techsmith. Capture, edit and share professional-quality content seamlessly.


    I look forward to your reply.

    Comment


      #3
      Thanks you, i check a profit in currency and profit is concerning my log... i understand this mistake!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      46 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      22 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      33 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      50 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      42 views
      0 likes
      Last Post CarlTrading  
      Working...
      X