need to backtest few trading systems; provide trading system analysis
Please DO NOT share any of the ppt info.
Need to create one/few app to backtest few trading systems; the program will output and log all trades, equity balance to excel, and provide analysis report regarding the system. If the app can formula the analysis report that would be great too. Report of the trading system would be similar to what metatrader4 provides from an EA report. Such as, # of trades, # of win trades, # lose trades, max lose, max win, average win, average lose, equity over time, etc... I will provide excel regarding what what info needed to log the trade, as well as the balance. Here are few of the system I would like to test:
1) point and figure - enclose ppt has more detail. Feel free to pick any break out that is easy to code based on the ppt file. I think the congested, side way, range movement are the best. Or the reversal works as well. Your call; at the end of the ppt, has the set of codes(which is a system already in TS codes).
2) the n-day + trend breakout. Review nday and trend ppt for more detail. Make N-day as a variable so we can easily backtest which N is the best. As for trend, we could use MACD fast(12)>slow(26) and MA(30) to identify up/down trend. Or we could use GMMA(EMA60>EMA50>EMA45>EMA40>EMA35>EMA30) to help decide up or down trend. If you have other method to help identify major trend, feel free to include that. As for STOP: included some examples. Few exit methods:
- time based, if stock is not performing in X number of days, little gain or little lost, EXIT. Make it as variable?
- ATR(Y-days) trailing stop.
- would like to have an option to code in target % gain exit or hard stop.(not sure if the hard stop loss is needed)
3) the method and system that you and i discussed - the range or congested sys?. If this is the best, lets tweak it to my need and add some variable.
Feel free to do whatever you want to test these. My goal is to work closely with you and setup on-going communication and make changes along the way as we develop ways to tweak and test the systems. Which every system has the best performance(profit consistently and decent trades) and easy to implement. Then I would want to setup another job to port it to IB for simulated trading with multiple account user/password configurable. Such as like managing multiple acct.
Addition items to support entry make them select-able, like a check box: I suggest every entry should do a quick check with MACD(MACD > 0 for long, MACD < 0 for short), day volume is 1.1 + > average volume(30 or 50), ParabolicSar above(short) or below(for long) price. Also, if you could code the Alex Elder's Impluse system candle bar to support the entry that would be great.
Impluse system candle: 1=long, 0=neutral, -1=short: (thinkscript codes:)
input length = 13;def EMA = MovAvgExponential(length=length)."AvgExp";
def MACDHist = MACDHistogram()."Diff";
def impulseSignal = if (EMA < EMA and MACDHist < MACDHist)
else if (EMA > EMA and MACDHist > MACDHist)
As discussed over skype, i am not too good at explaining things over writing, so if you have any questions, please let me know and we could go over in skype. I tried to put as much detail as much and hopefully i didn't introduce any confusion on what we discussed. sys1) point and figure with the codes already. sys2) nday breakout with trend supported. sys3) the one you and i discuss, will need tweaking on it and port it to stocks. The addition indicators is to help filter out bad trades/setups; hopefully they can be check/uncheck to review the result.
I will send more detail on trade logs and balance tracking(or we may not even needed :) if you already have it setup).
Looking forward to hear from you.