Page 1 of 1
Profit / Loss
Posted: 03 Sep 2013 00:35
by Simone
Hi,
There is a function return me my "P/L" and "Cum P/L" ? thank you !
Re: Profit / Loss
Posted: 03 Sep 2013 09:21
by WHS Support
Hello Simone,
The P/L is a function of your current position. If your position is closed the P/L will return to 0.
The Cum. P/L is a function of all P/L of the day. This will be returned to 0 with the end of the business day.
(You might have some difference today in regards to the US futures due to the public holiday and halted session in the US)
Kind regards
Dominic
WHS
Re: Profit / Loss
Posted: 03 Sep 2013 23:58
by Simone
Thanks for the reply but I means if is possible obtain Profit/Loss and Cum P/L into Express Stop code to adapt target or stop price.
I can track the most recent P/L with istructions:
SetIntraPeriodUpdate();
PL = MarketPosition() * (close - EntryPrice());
But I don't be able to get the sum of the previous Profit-loss (Cum P/L).
Is it possible using CumPL as array instead series ?
Best regards
Simone
Re: Profit / Loss
Posted: 09 Sep 2013 15:50
by WHS Support
Hi Simone,
no, unfortunately this is not possible to program with an Express Stop. The problem is, as you already pointed out, that you cannot track back the Cum P/L.
You can only program this in a normal Express indicator which is generating signals (=> Sentimentor). There you have to put your Stop / Target levels as Input variables with the result that you can calculate the distance between the entry / stop&target and sum it up as long as you want. As all signals are always triggered at the close of the bar you do not need the function Entryprice().
Kind regards,
Timo
WH SelfInvest