FXCM Forex Trading

Two Line SuperTrend Strategy

Strategies are published here.

Moderator: admin

Two Line SuperTrend Strategy

Postby Apprentice » Fri Sep 23, 2016 4:38 am

EURUSD m1 (09-23-2016 1041).png


Open Long
Both time frames are in up trend
Open Short
Both time frames are in down trend

Optinal Exit
If two time frames disagree.

If "Use Trend Filter" is off, second time frame filter will not be used.
If "Only on subtrend change" is on, trade will be executed,
only if we have a change in the indication on smaller time frame.

Two Line SuperTrend Strategy.lua
(21.7 KiB) Downloaded 361 times

SuperTrend.lua is available here.
viewtopic.php?f=17&t=3102&hilit=SUPERTREND
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 16114
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Two Line SuperTrend Strategy

Postby colajam1979 » Fri Sep 23, 2016 5:55 am

Good morning,
You sure are quick with your work. Thanks for this, i have it running in demo atm hoping it will work as expected 8-)
colajam1979
 
Posts: 28
Joined: Tue May 03, 2016 1:22 am

Re: Two Line SuperTrend Strategy

Postby colajam1979 » Fri Sep 23, 2016 10:15 am

Hello Apprentice.
I have run this in my demo account today and it works well enough for me but Can you modify it one more time so that a first position is opened sooner?

If the 5 minute is the trend line and is long when the 1 minute is short the short will not be opened - perfect.

if the 1 minute short continues changing the 5 minute trend to short can a short position be entered?

all other rules remain the same

see image below.

thanks again
Attachments
supertrend.PNG
colajam1979
 
Posts: 28
Joined: Tue May 03, 2016 1:22 am

Re: Two Line SuperTrend Strategy

Postby Norm123 » Tue Oct 04, 2016 2:28 pm

Hi Apprentice,

Many thanks for your content on here. Some really great stuff. I have been testing the 'two line supertrend' with different parameters etc. Almost a really good strategy for what I want.

Is it possible to add a function so that providing the two lines are in same direction, if I am using Line 1 as the shorter time period 'activating' line and it closes on opposite, the strategy keeps opening a new trade at the next trigger point in the same direction?

At the moment, I am using Line 1 as the shorter 'activation' line and Line 2 as the longer term trend. The stategy is only activating a trade at the first trigger point but then not closing on opposite and not activating subsequent trades even when both lines are in same direction.

Thanks!
Norm123
 
Posts: 2
Joined: Tue Oct 04, 2016 11:00 am

Re: Two Line SuperTrend Strategy

Postby Norm123 » Sat Oct 08, 2016 4:09 am

Hi Apprentice,

Having playing and fiddled with the parameters etc I have got it working.

Is it possible to add a Bollinger band filter to this strategy? In a long, when the price crosses through the upper Bollinger band, the trade closes and in a short, when the price crosses the lower band the trade closes?

Dan
Norm123
 
Posts: 2
Joined: Tue Oct 04, 2016 11:00 am

Re: Two Line SuperTrend Strategy

Postby Apprentice » Wed Oct 12, 2016 5:26 am

Bug Fixed.
Please Re-Download.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 16114
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Two Line SuperTrend Strategy

Postby Apprentice » Wed Oct 12, 2016 5:56 am

At the moment, I am using Line 1 as the shorter 'activation' line and Line 2 as the longer term trend. The stategy is only activating a trade at the first trigger point but then not closing on opposite and not activating subsequent trades even when both lines are in same direction.


Set "Only on subtrend change" to no
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 16114
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Two Line SuperTrend Strategy

Postby JOKER83 » Sat Oct 29, 2016 6:06 pm

can you make close parameter to the bigger supertrend
JOKER83
FXCodeBase: Initiate
 
Posts: 104
Joined: Fri Jul 11, 2014 7:44 am

Re: Two Line SuperTrend Strategy

Postby Apprentice » Sun Dec 18, 2016 9:10 am

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

Re: Two Line SuperTrend Strategy

Postby josediaz » Fri Jan 13, 2017 5:54 am

hi

i have installed your strategy, but there are not buy or sell

allow startegy to trade = true

thank you

regards
josediaz
 
Posts: 1
Joined: Thu Nov 24, 2016 10:06 am

Next

Return to Custom Strategies

Who is online

Users browsing this forum: No registered users and 3 guests