Current profit made by the closed trades of the running strategy.
Syntax:
1 |
myCurrentProfit = STRATEGYPROFIT |
Current profit made by the closed trades of the running strategy.
Syntax:
1 |
myCurrentProfit = STRATEGYPROFIT |
Is STRATEGYPROFIT 1) the total profit since the STRATEGY has been running in ProOrder Auto Trading (for example past year) or 2) the current profit with current total Open Positions?
STRATEGYPROFIT returns profit made by the system so far, with closed orders only.
Thanks Nicolas, can I suggest that the terminology of the explanation should be changed to reflect this eg. The Total profit of all the Closed trades to date.
You are right. I changed the explanation, thank you for feedback.
Grazie NICOLAS di esserci!
Ti ripeto la domanda, qui è forse più opportuna. Se sono in guadagno come posso incassare parte di esso senza interrompere il trade?
Grazie. Capitan Nemo
No, it’s not possible to partially exit position.
No, non è possibile uscire parzialmente posizione.
Is there a way to use strategyprofit to determine whether the previous trade was a win or a loss?
You should use positionperf for this purpose.
Thank you!
How to re-invest the profit in backtesting?
I first use the fix position in my backtesting as follow:
…
IF c1 THEN
BUY 100 SHARES AT MARKET
ENDIF
…
Since the result not bad, I try to re-invest the profit in the backtesting as follow:
…
number = (10000 + STRATEGYPROFIT)/close
IF c1 THEN
BUY number SHARES AT MARKET
ENDIF
…
But the result is getting worse, why?
Why “worse”? You a buying a quantity of shares, so dividing the account size by the share price is the right method.
May be I have to set
DEFPARAM CumulateOrders = True ?
Hi guys, does this value reset if an running algo crashes, for example due to not enough free equity on your account. I have an algo that reinvests on backtest based on this value, but did not do it in real trading yet. I know the running algo had to be restarted at one point, but the amount in the “total gain” column exceeds the value to start reinvesting. Might it be that it was reset due to the restart?
It reset each time the strategy is restarted.
STRATEGYPROFIT appears to not include any profit from orders closed as a result of SET TARGET pPROFIT. Has anyone else observed the same and is there a workaround? Many thanks all.
[edit – it seems this is a known issue where cumulateorders=true, in which case strategyprofit only udpates after the final position has closed]
Yes it cumulates profit from the closed trades, like stated in the description of the instruction above.