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 NullPointStrategies, Today, 05:17 AM
      0 responses
      52 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      130 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      70 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      44 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      49 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X