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):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
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 |
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
Interesting to try. what instruments did you test it on?
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)
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??
Also note that when used as a strategy, full timeframe continuity is important (i.e. price making should be green/red on higher timeframes)
Hi juan,
Thanks fort your strategy.
What value you enter for variables a,b,c,d,e,f,g, x and y?
Thanks
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.
Hi juanj. Can you type variable optimization code with same value?
Hi, thank you for sharing. What time-frames did you find worked best?
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
No comments.
200000k, 4h, 2010-2020, loss 3000€.
On other timeframes loss, loss, loss… loss.
Looser strategy!
Fork it and make it better, that’s what the website is made for 🙂 Good luck!
@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.
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 🙂
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..
Thanks very much for sharing, look forward to testing this idea out.
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
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
How do we apply this to a strategy we have made, Thanks