juanj

#TheStrat Combo Tester

Category: Strategies By: juanj Created: November 24, 2020, 10:11 AM
November 24, 2020, 10:11 AM
Strategies
18 Comments
#TheStrat Combo Tester

This strategy is an add-on to the #TheStrat Reversals indicator (also posted in the library) which is a dedication to the work of @RobInTheBlack (Twitter Handle) who has helped countless traders with this pure price action based strategy that he developed over the past 27 years of trading, It is called #TheStrat

This strategy is dedicated to testing the various #TheStrat reversal (and continuation) setups as explained on the picture provided in the attached gallery which in itself is based on the 4 different Price Action scenarios discussed here: https://www.newtraderu.com/2019/02/13/what-do-we-know-to-be-true-about-price-action/

I recommend importing the .ITF in order to load the test variables, but for those interested here is the code (The x,y and a,b,c,d,e,f variables are used to test different combinations):

Defparam cumulateorders = False

possize = 1

Tollerance = x
OrderTollerance = x
SLBuffer = y
TPBuffer = y

Type2121 = a//TwoOneTwo Continuation
Type2122 = b//TwoOneTwo Reversal
Type312 = c//ThreeOneTwo Reversal
Type322 = d//ThreeTwoTwo Reversal
Type122 = e//OneTwoTwo
Type22 = f//TwoTwo

LongOnly = 0
ShortOnly = 0

InsideBar = high < high[1]-tollerance*pointsize and low > low[1]+tollerance*pointsize
OutsideBar = high > high[1]+tollerance*pointsize and low < low[1]-tollerance*pointsize

TwoUp = high > high[1]+tollerance*pointsize and low > low[1]+tollerance*pointsize
TwoDown = low < low[1]-tollerance*pointsize and high < high[1]-tollerance*pointsize

Up = close > open+tollerance*pointsize
Down = close < Open-tollerance*pointsize

If onmarket = 0 and Type2121 = 1 Then
 If TwoUp[1] and Up[1] and InsideBar and ShortOnly = 0 Then
  Buy possize contract at high+OrderTollerance stop
  SL = high-low
  TP = high[1]-high
 ElsIf TwoDown[1] and Down[1] and InsideBar and LongOnly = 0 Then
  Sellshort possize contract at low-OrderTollerance stop
  SL = high-low
  TP = low-low[1]
 EndIf
 Type = 2121
EndIf

If onmarket = 0 and Type2122 = 1 Then
 If TwoUp[1] and Up[1] and InsideBar and LongOnly = 0 Then
  Sellshort possize contract at low-OrderTollerance stop
  SL = high-low
  TP = low-low[1]
 ElsIf TwoDown[1] and Down[1] and InsideBar and ShortOnly = 0 Then
  Buy possize contract at high+OrderTollerance stop
  SL = high-low
  TP = high[1]-high
 EndIf
 Type = 2122
EndIf

If onmarket = 0 and Type312 = 1 Then
 If OutsideBar[1] and Up[1] and InsideBar and LongOnly = 0 Then
  Sellshort possize contract at low-OrderTollerance stop
  SL = high-low
  TP = low-low[1]
 ElsIf OutsideBar[1] and Down[1] and InsideBar and ShortOnly = 0 Then
  Buy possize contract at high+OrderTollerance stop
  SL = high-low
  TP = high[1]-high
 EndIf
 Type = 312
EndIf

If onmarket = 0 and Type322 = 1 Then
 If OutsideBar[1] and Up[1] and TwoDown and Up and ShortOnly = 0 Then
  Buy possize contract at high+OrderTollerance stop
  SL = high-low
  TP = high[1]-high
 ElsIf OutsideBar[1] and Down[1] and TwoUp and Down and LongOnly = 0 Then
  Sellshort possize contract at low-OrderTollerance stop
  SL = high-low
  TP = low-low[1]
 EndIf
 Type = 322
EndIf

If onmarket = 0 and Type122 = 1 Then
 If InsideBar[1] and TwoUp and Up and LongOnly = 0 Then
  Sellshort possize contract at low-OrderTollerance stop
  SL = high-low
  TP = low-low[2]
 ElsIf InsideBar[1] and TwoDown and Down and ShortOnly = 0 Then
  Buy possize contract at high+OrderTollerance stop
  SL = high-low
  TP = high[2]-high
 EndIf
 Type = 122
EndIf

If onmarket = 0 and Type22 = 1 Then
 If InsideBar[1] = 0 and TwoUp and Up and LongOnly = 0 Then
  Sellshort possize contract at low-OrderTollerance stop
  SL = high-low
  TP = low-low[1]
 ElsIf InsideBar[1] = 0 and TwoDown and Down and ShortOnly = 0 Then
  Buy possize contract at high+OrderTollerance stop
  SL = high-low
  TP = high[1]-high
 EndIf
 Type = 22
EndIf

Graph Type as "Type"

Set Stop loss SL+SLBuffer
Set Target profit TP+TPBuffer

Download
Filename: The-Strat-Combos-1.jpg
Downloads: 1129
Download
Filename: TheStrat-Combo-Tester.itf
Downloads: 1234
juanj
juanj Master
My name is Juan Jacobs and I am an algorithmic trader and trading coach. After 7 years of corporate work as a Systems Analyst, I have decided to pursue my passion of trading on a full-time basis. My current focus area is that of 'smart' strategies based on 'Machine Learning'. You can find me at www.FXautomate.com or visit my PRC Marketplace Store here: https://market.prorealcode.com/store/fxautomate/
Author’s Profile

Comments

UkDownUnder
4 years ago
#

How do we apply this to a strategy we have made, Thanks

herke036
5 years ago
#

For the question how to fill the variables a,b,c,d,e,f,g, x and y? a,b,c,d,e,f,g is selecting the desired method. To set the first method do a=1 b=0 c=0 d=0 f=0 g=0 for x and y I used 2 pips x=2 and y = 2 Use e.g. 15 min ustech100(1usd) and you will get good results

AntoGH
6 years ago
#

How did you backtested it ? i downloaded the file and put it in the backtest section but it still not working, HOW do you know ? and can you give us the code for backtest ? thanks

Anonymous
6 years ago
#

Thanks very much for sharing, look forward to testing this idea out.

aaronparry1
6 years ago
#

Thanks @Juanj. Love this! It's really does not take much to make this into a winning strategy. Backtested with 10k on multiple 15min and 30min charts and it's returns good results (the most volatile stocks return the best results) - Add Full Time Frame Continuity Parameter - Add increased Volume parameter - Tweak the Target/Stop Loss parameters to suit your personal risk level Thanks again, appreciate you sharing your work :)

seappa8@gmail.com
6 years ago
#

Hi @aaronparry1 .. i kind of got lost in multi time frame continuity .. tried a lot (Rob s too fast for me to comprehend him :) ).. can you help & share your work.. you can hide the IP or any special edge if you want.. i want to learn the concept..

juanj
6 years ago
#

@Fran55 you are completely missing the point of this strategy. It is a tool to test different types of price action reversal signals not a standalone strategy. If you want a strategy out of it, like Nicolas said build one.

Fran55
6 years ago
#

No comments. 200000k, 4h, 2010-2020, loss 3000€. On other timeframes loss, loss, loss... loss. Looser strategy!

Nicolas
6 years ago
#

Fork it and make it better, that's what the website is made for :) Good luck!

juanj
6 years ago
#

This script does not include timeframe continuity it simply tests for the best signals. I am just saying that if you plan on using this in a strategy it should be implemented. When used on it's own a higher timeframe (4H+) would obviously give more reliable signals. But when used in a strategy it can be utilized on a lower timeframe in conjunction with multi timeframe continuity

Anonymous
6 years ago
#

Hi, thank you for sharing. What time-frames did you find worked best?

Jakubovsky
6 years ago
#

Hi juanj. Can you type variable optimization code with same value?

Jeremy8
6 years ago
#

Hi juan, Thanks fort your strategy. What value you enter for variables a,b,c,d,e,f,g, x and y? Thanks

seappa8@gmail.com
6 years ago
#

Hi How are you ensuring full time frame continuity in this script? i tried it on same instrument & few others.. my pro back test results were poor. please help.

juanj
6 years ago
#

Also note that when used as a strategy, full timeframe continuity is important (i.e. price making should be green/red on higher timeframes)

juanj
6 years ago
#

It doesn't really matter. TheStrat is actually mostly used on high Alpha U.S Stocks but can be used in any market as it relies on Price Action reversals. The screenshot is of the Wall Street Cash market (DJI)

herke036
5 years ago
#

In your code I see If onmarket = 0 and Type22 = 1 and hora1 and hora2 Then If InsideBar[1] = 0 and TwoUp and Up and LongOnly = 0 Then Sellshort possize contract at low-OrderTollerance stop SL = high-low TP = low-low[1] ElsIf InsideBar[1] = 0 and TwoDown and Down and ShortOnly = 0 Then Buy possize contract at high+OrderTollerance stop SL = high-low TP = high[1]-high EndIf Type = 22 EndIf Is the condition to go long not for the shortposition and visa versa??

fred680
6 years ago
#

Interesting to try. what instruments did you test it on?

ProRealCode ProRealCode
Loading...