ProRealAlgos

Larry-Connor converted to DAX M1

Category: Strategies By: ProRealAlgos Created: July 18, 2023, 12:12 PM
July 18, 2023, 12:12 PM
Strategies
19 Comments
Larry-Connor converted to DAX M1

Runs on the 1 minute timeframe on DAX40. 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:

  1. The latest bar close must be higher than the 200bars moving average.

  2. The latest bar close must be lower than the 5-bars moving average.

  3. Two bars ago both the high and low were lower than the bar before.

  4. The high and low of the previous bar must be lower than the bar before that.

  5. The high and low must be lower than the previous bar.

  6. If conditions 1-5 are true, then buy.

  7. Exit at the bar close when prive is above above the 5-bar moving average.

The code

////////////////////////////////////////////////////////////////////////
//   _____           _____            _          _                    //
//  |  __ \         |  __ \          | |   /\   | |                   //
//  | |__) | __ ___ | |__) |___  __ _| |  /  \  | | __ _  ___  ___    //
//  |  ___/ '__/ _ \|  _  // _ \/ _` | | / /\ \ | |/ _` |/ _ \/ __|   //
//  | |   | | | (_) | | \ \  __/ (_| | |/ ____ \| | (_| | (_) \__ \   //
//  |_|   |_|  \___/|_|  \_\___|\__,_|_/_/    \_\_|\__, |\___/|___/   //
//                                                  __/ |             //
//  The highest rated developer on Trustpilot      |___/              //
//  ProRealAlgos.com                                                  //
////////////////////////////////////////////////////////////////////////

DefParam CumulateOrders=False

noEntryBeforeTime = 080000
noEntryAfterTime = 1715000

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 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

Download
Filename: Larry-Connor-converted-DAX-M1.itf
Downloads: 315
Download
Filename: Larry-Connor-converted-to-DAX-M1.png
Downloads: 129
ProRealAlgos
ProRealAlgos Junior
Developing algos and indicators for ProRealTime Go to ProRealAlgos.com
Author’s Profile

Comments

andyfx79
3 years ago
#

l have been demoing for the past couple of weeks with great results , but during a bear market it makes a loss , can this algo be adjusted to work on the short side also to counter this issue ? thanks .

YvesRobert
3 years ago
#

Hello, can someone explain this strategy because I don't understand what the program does exactly ? Thank you.

superfalcio
3 years ago
#

From my side it is working demo and live :)

ProRealAlgos
3 years ago
#

Same here ;)

darbes
3 years ago
#

Hi Guys, I tried it on DAX and DOW but no orders are sent when backtesting is recording orders. Any clues ? Best

ProRealAlgos
3 years ago
#

So backtest is working but not live?

richmoore123
3 years ago
#

Hello, many thanks for these strategy ideas. Can you please confirm what time zone your conditions relate to? I am in the UK so I am wondering if I need to adjust these. Thanks

ProRealAlgos
3 years ago
#

Yes this is for UTC+2 so you would have to adjust that

JohnScher
3 years ago
#

Please take into account the spread when closing the positions at night

superfalcio
3 years ago
#

Yeah finally, thank you. I didn't understand why if i paste my code here, it get changed ... Anyway same code I had. :))) Just to notice you took in the last code for US Tech 100 the time window 150000-220000. I investigated (last 100000 periods) diferent windows time and I got the best Profit Factor with the window 120000-200000. Moreover (US Tech 100, last 100000 periods), %Stop Loss at 1.6 looks the best.

superfalcio
3 years ago
#

sorry, it seams it does not allow me to paste the whole code....

ProRealAlgos.com
3 years ago
#

Here you go. To be run on US Tech 100 on the 1 minute timeframe. 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

Jocke
3 years ago
#

Hello. So how to correct this error? I cant get it to work as it is now. Go it to work.

ProRealAlgos.com
3 years ago
#

Hi Superfalcio. IF you look at the code you posted you can see that there are numerous errors e.g. this line: noEntryAfterTime = time Average[200](Close)

superfalcio
3 years ago
#

Repost the complete code i reviewed.... //Simulation 20/07/2023 - USTech Spread=2p - TF 1Minute --> PF=2.57 DefParam CumulateOrders=False noEntryBeforeTime = time > 120000 noEntryAfterTime = time 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=LowAverage[5](Close) and (dlow(0) < dlow(1) xor dhigh(0) dlow(1) and dhigh(0) < dhigh(1) then sell at market endif

ProRealAlgos.com
3 years ago
#

Hi Superfalcio. You are right, forgot to add it to the if statement. Yes it works great on US Tech 100 aswell, however your code seems incomplete. Can you send it here again.

T-rader
3 years ago
#

Thanks for this code. Don´t forget to ad spread tho. 2p spread removes 900 profit

superfalcio
3 years ago
#

I make this simulation with the time window in 1m with USTech. PF result is 2.71 DefParam CumulateOrders=False noEntryBeforeTime = time > 120000 noEntryAfterTime = time 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=LowAverage[5](Close) and (dlow(0) < dlow(1) xor dhigh(0) dlow(1) and dhigh(0) < dhigh(1) then sell at market endif

superfalcio
3 years ago
#

Hello, i am interested in the code... I noticed that the code do not work taking into consideration the time window: noEntryBeforeTime = 080000 noEntryAfterTime = 1715000 This condiction must be recalled in the buying IF requirements....

ProRealCode ProRealCode
Loading...