.
Visual P/L and backtesting too
A visual chart of P/L would be great and backtesting possibilities too.
Other forum topics already asked for backtesting.
I think its quite easy to create, see screenshot below where 'profit' is shown in additional frame 2.
The following additional code was needed:
{BackTest}
LongKill:= ShortSignal and cum (LongSignal);
{close Long Position if existing}
SumLong:=cum( LongSignal - LongKill);
{resulting Long Positions}
ShortKill:= LongSignal and cum (ShortSignal);
{close Short Position if existing}
SumShort:=cum( ShortSignal-ShortKill);
{resulting Short Positions}
Cashflow:=(ShortSignal+LongKill)*Close-(LongSignal+ShortKill)*(Close+0.0003);
Cash:= cum(Cashflow);
{resulting cash}
Value:=SumLong*Close - SumShort*(Close+0.0003) ;
profit:=(Cash+Value)*100000;
{End of script…}
But perhaps Im wrong cause some answers said 'until now no way for a backtesting indicator'. So if you think there are errors in my code, please let me know.
In a similar way you could create a realtime indicator, which shows the result of a running Trading System starting not in history but with the start of the system itwelf as cms-5857 mentinoned, see following link:
http://forum.vtsystems.com/index.php?s=&sh...=findpost&p=248
If you think its worthwhile, Ill try to post running examples of such trading systems.
Regards,
Konny
