Runs on the 1 minute timeframe on US Tech 100 It’s traditionally run on the daily timeframe but I found out it works exceptionally on the 1 minute timeframe.
The rules of the 3-day high/low method/strategy converted to the 1 minute timeframe looks like this:
-
The latest bar close must be higher than the 200bars moving average.
-
The latest bar close must be lower than the 5-bars moving average.
-
Two bars ago both the high and low were lower than the bar before.
-
The high and low of the previous bar must be lower than the bar before that.
-
The high and low must be lower than the previous bar.
-
If conditions 1-5 are true, then buy.
-
Exit at the bar close when prive is above above the 5-bar moving average.
The code
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 |
//////////////////////////////////////////////////////////////////////// // _____ _____ _ _ // // | __ \ | __ \ | | /\ | | // // | |__) | __ ___ | |__) |___ __ _| | / \ | | __ _ ___ ___ // // | ___/ '__/ _ \| _ // _ \/ _` | | / /\ \ | |/ _` |/ _ \/ __| // // | | | | | (_) | | \ \ __/ (_| | |/ ____ \| | (_| | (_) \__ \ // // |_| |_| \___/|_| \_\___|\__,_|_/_/ \_\_|\__, |\___/|___/ // // __/ | // // The highest rated developer on Trustpilot |___/ // // ProRealAlgos.com // //////////////////////////////////////////////////////////////////////// DefParam CumulateOrders=False noEntryBeforeTime = 150000 noEntryAfterTime = 220000 C1=Close>Average[200](Close) C2=Close<Average[5](Close) C3A=High[2]<High[3] C3B=Low[2]<Low[3] C4A=High[1]<High[2] C4B=Low[1]<Low[2] C5A=High<High[1] C5B=Low<Low[1] If C1 and C2 and C3A and C3B and C4A and C4B and C5A and C5B and time >= noEntryBeforeTime and time <= noEntryAfterTime then Buy 1 contract at Market SET STOP %LOSS 1.4 EndIf If Close>Average[5](Close) and (dlow(0) < dlow(1) xor dhigh(0) < dhigh(1)) then Sell at Market EndIf if dlow(0) > dlow(1) and dhigh(0) < dhigh(1) then sell at market endif |
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
It works well, as it trade 1m chart and there’s no much data. Can you code with selling mode too?
Thanks
Hi Crusoe76. Do you mean that you would like a short version of this?
yes please
Hi, first of all thank you for your sharing.
I’m new of ProRealTime and I can’t replicate your performance. I ran the strategy on US Tech 100 Cash (1$) with M1 timeframe and the win/loss ratio is 1.81
Where I wrong?
thank you in advance!