How do I get total shares and total profit for all the positions ?
Example,
Symbol: EEM
Buy: 1/1/2003 100 shares
Buy 2/1/2003 100 shares
How do I get 200 shares and total profit ?
Thanks
Size:
Color:
By design, Wealth-Lab executes Strategy backtests with 1 share in Raw Profit mode and then applies a position sizing overlay. One can't get true "total shares" and "total profit" in a Strategy using standard means only. Only extensions like performance visualizers and PosSizers can access that.
What are you trying to achieve with that? Maybe we could help find a way or a known workaround.
Size:
Color:
1) Buy At Market IVV 100 Shares (or $10,000).
2) Buy another IVV 100 shares (or $10,000) if the first position is down 2%.
3) Buy another IVV 100 shares (or $10,000) if the second position is down 2%.
Sell all shares depending on toal profit/loss.
Thanks
Size:
Color:
Then you can easily build this strategy using means available:
1. For sizing, either use SetShareSize(100) + choose "WealthScript Override" for sizing, or simply select 100 shares.
2. The 'total profit' is just average entry price + N%.
CODE:
Please log in to see this code.
Size:
Color:
Thanks
Size:
Color: