## 2 MOVING AVERAGE AND SUPERTREND STRATEGY AND ALERT

If you need an Indicator or Signal developed or translated from other language, please post all Indicator development REQUESTS to this section here.

### 2 MOVING AVERAGE AND SUPERTREND STRATEGY AND ALERT

Hi Everyone
Are there anybody can make those strategy and alert

Strategy based on the 3 indicator
AVERAGES - SHIFT_MA and SUPERTREND

OPEN LONG= PRICE>AVERAGES - SHIFT_MA and SUPERTREND 3 OF THEM

CLOSE LONG=
A1= MAX(AVERAGES - SHIFT_MA) ,
B1= MIN (A - SUPERTREND)
CLOSE LONG= PRICE<B1

OPEN SHORT= PRICE<AVERAGES - SHIFT_MA and SUPERTREND 3 OF THEM

CLOSE SHORT=
A2= MIN(AVERAGES - SHIFT_MA) ,
B2= MAX (A - SUPERTREND)
CLOSE LONG= PRICE>B2

Thank to everyone
SerifKocdemir

Posts: 15
Joined: Thu Aug 08, 2019 11:48 am

### Re: 2 MOVING AVERAGE AND SUPERTREND STRATEGY AND ALERT

Your request is added to the development list under Id Number 4840 Apprentice
FXCodeBase: Confirmed User

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

### Re: 2 MOVING AVERAGE AND SUPERTREND STRATEGY AND ALERT

I don't understand the rules.
Is it
Open Long
Price > (AVERAGES - SHIFT_MA)
Price > supertrend
Close long
PRICE< (AVERAGES - SHIFT_MA - SUPERTREND)

AVERAGES - SHIFT_MA and price can have quite different (incomparable) values. Apprentice
FXCodeBase: Confirmed User

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

### Re: 2 MOVING AVERAGE AND SUPERTREND STRATEGY AND ALERT

I will try explain

Open Long
Price > (AVERAGES - SHIFT_MA)
Price > supertrend
TRUE ok.

Close long

1.First algoritma compare/calculate value between (AVERAGES and SHIFT_MA) than choose bigger/over value ,(let say this result '' A1 ''

2. than algoritma compare/calculate this result/balue between (''A1'' and SUPER TREND) than but this time choose ''smaller/below'' value.
let say this result B2

Close long
if PRICE under/below B2 than close
PRICE< B2

Open short
Price < (AVERAGES - SHIFT_MA)
Price < supertrend TRUE ok.

Close short

1.First algoritma compare/calculate value between (AVERAGES and SHIFT_MA) than choose smaller/under value,(let say this result '' AA1 ''

2. than algoritma compare/calculate this result value between (''AA1'' and SUPER TREND) than,
but this time choose ''bigger/over'' value.
let say this result BB2

Close short
if PRICE bigger/over BB2 than close
PRICE> BB2

ALSO
I HAVE WRITED METASTOCK CODE THAT I USE (I THİNK ALSO IT CAN HELP )

OPEN LONG
A1:=MAXIMUM(MOV(C,200,SMMA),REF(MOV(c,200,SMMA),-20));
B1:=MAXIMUM(A1,SUPERTREND);
C>B1

CLOSE LONG
A1:=MAXIMUM(MOV(C,200,SMMA),REF(MOV(c,200,SMMA),-20));
B2:=MINIMUM(A1,SUPERTREND);
C<B2

OPEN SHORT
AA1:=MANIMUM(MOV(C,200,SMMA),REF(MOV(c,200,SMMA),-20));
BB1:=MINIMUM(AA1,SUPERTRENDT);
C<BB1

CLOSE SHORT
AA1:=MINIMUM(MOV(C,200,SMMA),REF(MOV(c,200,SMMA),-20));
BB2:=MAXIMUM(AA1,SUPERTRENDT);
C>BB2

SORRY MY POOR EXPLANATION
MY BEST WISHES.
SerifKocdemir

Posts: 15
Joined: Thu Aug 08, 2019 11:48 am

### Re: 2 MOVING AVERAGE AND SUPERTREND STRATEGY AND ALERT

I will try explain

Open Long
Price > (AVERAGES - SHIFT_MA)
Price > supertrend
TRUE ok.

Close long

1.First algoritma compare/calculate value between (AVERAGES and SHIFT_MA) than choose bigger/over value ,(let say this result '' A1 ''

2. than algoritma compare/calculate this result/balue between (''A1'' and SUPER TREND) than but this time choose ''smaller/below'' value.
let say this result B2

Close long
if PRICE under/below B2 than close
PRICE< B2

Open short
Price < (AVERAGES - SHIFT_MA)
Price < supertrend TRUE ok.

Close short

1.First algoritma compare/calculate value between (AVERAGES and SHIFT_MA) than choose smaller/under value,(let say this result '' AA1 ''

2. than algoritma compare/calculate this result value between (''AA1'' and SUPER TREND) than,
but this time choose ''bigger/over'' value.
let say this result BB2

Close short
if PRICE bigger/over BB2 than close
PRICE> BB2

ALSO
I HAVE WRITED METASTOCK CODE THAT I USE (I THİNK ALSO IT CAN HELP )

OPEN LONG
A1:=MAXIMUM(MOV(C,200,SMMA),REF(MOV(c,200,SMMA),-20));
B1:=MAXIMUM(A1,SUPERTREND);
C>B1

CLOSE LONG
A1:=MAXIMUM(MOV(C,200,SMMA),REF(MOV(c,200,SMMA),-20));
B2:=MINIMUM(A1,SUPERTREND);
C<B2

OPEN SHORT
AA1:=MANIMUM(MOV(C,200,SMMA),REF(MOV(c,200,SMMA),-20));
BB1:=MINIMUM(AA1,SUPERTRENDT);
C<BB1

CLOSE SHORT
AA1:=MINIMUM(MOV(C,200,SMMA),REF(MOV(c,200,SMMA),-20));
BB2:=MAXIMUM(AA1,SUPERTRENDT);
C>BB2

SORRY MY POOR EXPLANATION
MY BEST WISHES.
SerifKocdemir

Posts: 15
Joined: Thu Aug 08, 2019 11:48 am

### Re: 2 MOVING AVERAGE AND SUPERTREND STRATEGY AND ALERT Apprentice
FXCodeBase: Confirmed User

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

### Re: 2 MOVING AVERAGE AND SUPERTREND STRATEGY AND ALERT

Thank you so much Apprentice
Good work.
I have backtested.

It is good but I really dont like trade with oscillator
I like trade with indicator with chart because I like follow trend/go with trend

If it is possible for you
Can you expel out Cross Stochastic Strategy than Can you embed in supertrend according to rule that I say before??

Thank you so much again.
SerifKocdemir

Posts: 15
Joined: Thu Aug 08, 2019 11:48 am

### Re: 2 MOVING AVERAGE AND SUPERTREND STRATEGY AND ALERT

Can you provide the rules? Apprentice
FXCodeBase: Confirmed User

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

### Re: 2 MOVING AVERAGE AND SUPERTREND STRATEGY AND ALERT

PROVIDED BY USER

EASY RULES OPEN LONG RULES
A1:= MAXIMUM OF ( MOV(C,PERIOD,SMMA),(MOV(c,PERIOD,SMMA);
B1:= MAXIMUM OF ( A1, SUPERTREND);
CLOSE PRICE >B1
Price will be higher than 2 moving averages and Price will be higher than supertrend

CLOSE LONG RULES
A1:= MAXIMUM OF ( MOV(C,PERIOD,SMMA),(MOV(c,PERIOD,SMMA);
B2:= MINIMUM OF ( A1, SUPERTREND);
CLOSE PRICE <B2

Price will be lower than highest one of 2 moving averages(not both of)
and Price will be lower than supertrend

OPEN SHORT RULES
AA1:= MANIMUM OF ( MOV(C,PERIOD,SMMA),(MOV(c,PERIOD,SMMA);
BB1:= MINIMUM OF ( AA1, SUPERTRENDT);
CLOSE PRICE <BB1

Price will be lower than 2 moving averages and Price will be lower than supertrend

CLOSE SHORT RULES
AA1:= MINIMUM OF ( MOV(C,PERIOD,SMMA),(MOV(c,PERIOD,SMMA);
BB2:= MAXIMUM OF ( AA1, SUPERTRENDT );
CLOSE PRICE >BB2

Price will be higher than lowest one of 2 moving averages (not both of)
and Price will be higher than supertrend

I have send here because I think that May be , You want to ask more question Apprentice
FXCodeBase: Confirmed User

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

### Re: 2 MOVING AVERAGE AND SUPERTREND STRATEGY AND ALERT

I don't understand the meaning of
A1:= MAXIMUM OF ( MOV(C,PERIOD,SMMA),(MOV(c,PERIOD,SMMA);
then

MOV(C,PERIOD,SMMA) and MOV(c,PERIOD,SMMA) will have same valuu.
Will be sufficient to only have one instance, without MAX function. Apprentice
FXCodeBase: Confirmed User

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

Next