Login Page - Create Account

Support Board


Date/Time: Thu, 28 Nov 2024 01:28:38 +0000



Post From: Programming Help - Display of cumulative PnL in points

[2023-06-17 22:56:48]
Sawtooth - Posts: 4120
I need a running counter of cumulative sum of all Daily PnL from the start of the chosen date range setting used under Chart Settings> "Date Range From YYYY-MM-DD" field.
Use the Trading: Closed Profit/Loss study.
(IMO this study should be named Trading: Cumulative Profit/Loss).

The challenge will be to not let it display its cumulative value until the following day's open.
Try this in the Spreadsheet Formula study's Formula Field:
=IF(BARDATE>BARDATE[-1],ID20.SG1,ID21.SG1[-1])
where ID20 is the Trading: Closed Profit/Loss study, and ID21 is this Spreadsheet Formula study.