Is there away to have it close all trades so there is no Open Position PL?
Does the Gross/Net Profits include the Open Position PL?
thanks
64 bit ROCKS
Portfolio backtester?
-
- Posts: 62
- Joined: 03 Nov 2011
- Has thanked: 12 times
- Been thanked: 2 times
- Dave Masalov
- Posts: 1712
- Joined: 16 Apr 2010
- Has thanked: 51 times
- Been thanked: 489 times
Re: Portfolio backtester?
Hello greenroomhoo,
The only way to do so is to close the positions using your script. I.e. close all open positions at the end of every trading session.
You want to see portfolio performance report with all positions closed (no Open Position PL), is my understanding correct?Is there away to have it close all trades so there is no Open Position PL?
The only way to do so is to close the positions using your script. I.e. close all open positions at the end of every trading session.
No it does not. You can calculate the sum of Portfolio_NetProfit and Portfolio_OpenPositionProfit in your script.Does the Gross/Net Profits include the Open Position PL?
-
- Posts: 62
- Joined: 03 Nov 2011
- Has thanked: 12 times
- Been thanked: 2 times
Re: Portfolio backtester?
I have a simple signal to do this, called "_Close Last Trade." It just has four lines of code:
You can just add this additional signal to your existing portfolio, rather than having to add custom code to each and every script.
This is adapted from some code by Sunny Harris in TS Made Easy. (A good introductory book that's largely transferable to MultiCharts.)
http://www.amazon.com/TS-Made ... 0471353531
Code: Select all
If LastBarOnChart AND MarketPosition = 1 then begin
Sell this bar at close ;
BuyToCover this bar at close ;
end ;
This is adapted from some code by Sunny Harris in TS Made Easy. (A good introductory book that's largely transferable to MultiCharts.)
http://www.amazon.com/TS-Made ... 0471353531
Re: Portfolio backtester?
Code: Select all
If LastBarOnChart AND MarketPosition = 1 then begin
-
- Posts: 62
- Joined: 03 Nov 2011
- Has thanked: 12 times
- Been thanked: 2 times