Trend Chaser v2.0

Category: Strategies By: MikeGC Created: August 20, 2016, 2:30 PM
August 20, 2016, 2:30 PM
Strategies
35 Comments

I posted “Bullish and Bearish Forex Screeners (based on 3 indicators)” about 4 months ago and had a lot of suggestions and support from @Nicolas, @Sofitech and @Doctrading to develop an automatic trading system.

Well, after a lot of testing, I have come up with the attached system.  It seems to be happier in the longer time frames viz. H4 up.  I have posted it with two variables, a and b, which are the parameters for the SuperTrend indicator.  Since this is the exit signal, it is important to optimise these variables for the instrument you plan to trade.  Then enter the results of the optimisation into the code and prepare it for automatic trading.  I suggest you test it forward first before committing real money.

I found a wonderful site for the procedures involved in creating and testing a strategy at https://trading.prorealtime.com/en/create-a-trading-system, for those of you who haven’t found it already.

I have also attached the results from 4 tests, of which the DAX was the most spectacular, with 2000% gain in about 15 weeks.  However it had the largest drawdown.

So have fun playing with this.  I look forward to your suggestions for improvements.

DEFPARAM CumulateOrders = true // Cumulating positions activated

// Indicators
COI = WEIGHTEDAVERAGE[10](ROC[14] +ROC[11])
MAC = MACDline[12,26,9](close)
STO = Stochastic[14,3](close)
ST = Supertrend[a,b]

// Conditions to enter long positions
c1 = COI > COI[1] AND COI < 0
c2 = MAC > MAC[1] AND MAC < 0
c3 = STO > 20 AND STO < 40

IF Not ShortOnMarket AND c1 AND c2 AND c3 THEN
 BUY 1 CONTRACT AT MARKET
ENDIF

// Conditions to exit long positions
c5 = close crosses over ST

IF c5 THEN
 SELL AT MARKET
ENDIF

// Conditions to enter short positions
c11 = COI < COI[1] AND COI > 0
c12 = MAC < MAC[1] AND MAC > 0
c13 = STO < 80 AND STO > 60

IF Not LongOnMarket AND c11 AND c12 AND c13 THEN
 SELLSHORT 1 CONTRACT AT MARKET
ENDIF

// Conditions to exit short positions
c15 = close crosses under ST

IF c15 THEN
 EXITSHORT AT MARKET
ENDIF

Download
Filename: Trend-Chaser-v.2.0-GBPUSD-H4-178.png
Downloads: 153
Download
Filename: Trend-Chaser-v.2.0-AUS200-H4-642.png
Downloads: 103
Download
Filename: TrendChaser-v2.0.itf
Downloads: 440
Download
Filename: Trend-Chaser-v.2.0-DAX-H4-2099-1.png
Downloads: 199
Download
Filename: Trend-Chaser-v.2.0-AUDUSD-H4-45.png
Downloads: 228
MikeGC Average
I am new to programming PRT but have been trading with PRT for about 6 years. It is a wonderful charting package but little assistance is provided with the coding of automatic traders....until now! Congratulations to Nicolas and the team who put this site together and to the great contributors. My wish is to complete the coding of my system, with some help, and to post it on this site for all to test and critique. It has been a great manual system for me and is quite profitable, but translating it into PRT is now the challenge.
Author’s Profile

Comments

Logo Logo
Loading...