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 Mindset, 04-21-2026, 06:46 AM
      0 responses
      90 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      137 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      68 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      120 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      72 views
      0 likes
      Last Post PaulMohn  
      Working...
      X