Fractal and ATR strategy

Strategies are published here.

Moderator: admin

Fractal and ATR strategy

Postby Alexander.Gettinger » Mon Dec 26, 2011 6:10 am

This strategy is written on request viewtopic.php?f=27&t=8287&p=18405#p18405

BUY condition:
fractal high - fractal low < ATR*Mult and appearance of new lower fractal,

SELL condition:
fractal high- fractal low< ATR*Mult and appearance of new upper fractal.

Stop loss will be opposite fractal, take profit will be open price +/- ATR*[ATR mult].

Download:
Fractal_ATR_Strategy.lua
(13.9 KiB) Downloaded 1050 times


The Strategy was revised and updated on December 17, 2018.
Alexander.Gettinger
FXCodeBase: Confirmed User
 
Posts: 3785
Joined: Wed Mar 31, 2010 9:40 pm
Location: Russia, Omsk

Re: Fractal and ATR strategy

Postby Exolon » Fri Feb 03, 2012 9:19 pm

With EUR-USD over a 3 month period, I can't find any combination of parameters that produce any trades.
Also, could you explain how the limit and stop loss values are derived, since they're not directly set by the user?
Exolon
 
Posts: 27
Joined: Thu Jul 07, 2011 5:39 pm

Re: Fractal and ATR strategy

Postby Exolon » Fri Feb 03, 2012 9:20 pm

Oops, reading fail for me, the explanation was in your original post!
Exolon
 
Posts: 27
Joined: Thu Jul 07, 2011 5:39 pm

Re: Fractal and ATR strategy

Postby cash4u » Wed Jun 27, 2012 6:15 am

hi,

i have used this strategy by puting stop at 1 ATR limit at 2ATR . this strategy {when the opposite condition fulfills} closes open position before it reaches the limit level

can you add exit options 1. after reaching limit and stop level
2. as per strategy

thanking you

its cash4u
User avatar
cash4u
 
Posts: 53
Joined: Sun Feb 19, 2012 8:03 pm

Re: Fractal and ATR strategy

Postby Apprentice » Thu Jun 28, 2012 1:15 am

Your request is added to the development list.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 26097
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Fractal and ATR strategy

Postby djbraski » Mon Sep 28, 2015 7:22 pm

Hello!

After about two or three trades this straregy inevitably get the following error, stopping the strategy.

Fractal_ATR_Strategy.lua:313 The value of the rate is incorrect. It must be a number > 120.108.

The 120.108 figure is the price. This error doesn't show up in backtesting or optimizing. Any advice here? It wouldn't be a huge deal except that the strategy is actively controlling when to close the trade, so when it stops it seems there's no stop/limit for the open trades. Thank you!

djbraski
djbraski
 
Posts: 2
Joined: Mon Sep 28, 2015 7:13 pm

Re: Fractal and ATR strategy

Postby djbraski » Mon Sep 28, 2015 7:27 pm

Hello!

After about two or three trades this straregy inevitably get the following error, stopping the strategy.

Fractal_ATR_Strategy.lua:313 The value of the rate is incorrect. It must be a number > 120.108.

The 120.108 figure is the price. This error doesn't show up in backtesting or optimizing. Any advice here? It wouldn't be a huge deal except that the strategy is actively controlling when to close the trade, so when it stops it seems there's no stop/limit for the open trades. Thank you!

djbraski
djbraski
 
Posts: 2
Joined: Mon Sep 28, 2015 7:13 pm

Re: Fractal and ATR strategy

Postby Apprentice » Tue Dec 13, 2016 4:12 pm

Strategy was revised and updated.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 26097
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Fractal and ATR strategy

Postby swingtrader » Mon Mar 04, 2019 12:59 pm

hi ,

i am getting following error

C:/Program Files/Candleworks/FXTS2/Strategies/Custom/Fractal_ATR_Strategy.lua:-1: nil
swingtrader
 
Posts: 31
Joined: Mon Oct 24, 2011 3:14 pm

Re: Fractal and ATR strategy

Postby Apprentice » Mon Apr 01, 2019 10:27 am

I can not reproduce it.
Continues testing on a demo account.

Can you provide an error line number?
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 26097
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia


Return to Custom Strategies

Who is online

Users browsing this forum: terminator2410 and 6 guests