## Fractal and ATR strategy

Strategies are published here.

### Fractal and ATR strategy

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

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

Fractal_ATR_Strategy.lua

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

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

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

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

cash4u

Posts: 53
Joined: Sun Feb 19, 2012 8:03 pm

### Re: Fractal and ATR strategy

Apprentice
FXCodeBase: Confirmed User

Posts: 24480
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

### Re: Fractal and ATR strategy

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!

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

### Re: Fractal and ATR strategy

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!

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

### Re: Fractal and ATR strategy

Strategy was revised and updated.

Apprentice
FXCodeBase: Confirmed User

Posts: 24480
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

### Re: Fractal and ATR strategy

hi ,

i am getting following error

C:/Program Files/Candleworks/FXTS2/Strategies/Custom/Fractal_ATR_Strategy.lua:-1: nil

Posts: 31
Joined: Mon Oct 24, 2011 3:14 pm

### Re: Fractal and ATR strategy

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

Can you provide an error line number?

Apprentice
FXCodeBase: Confirmed User

Posts: 24480
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia