Page 2 of 2

Re: 2 MOVING AVERAGE AND SUPERTREND STRATEGY AND ALERT

PostPosted: Mon Aug 19, 2019 10:00 am
by SerifKocdemir
we use 2 different moving averages.
We use closer moving average to price and we ignore far moving average to price
if moving averages change sutiation/cross eachother we again use closer moving average to price
and we ignore far moving average to price.

Re: 2 MOVING AVERAGE AND SUPERTREND STRATEGY AND ALERT

PostPosted: Mon Aug 19, 2019 10:06 am
by SerifKocdemir
MOV(C,10,SMMA) and MOV(c,50,SMMA)
If MOV(C,50,SMMA) under and closer to price than MOV(C,10,SMMA)
we use MOV(C,50,SMMA) level

If MOV(C,10,SMMA) under and closer to price than MOV(C,50,SMMA)
we use MOV(C,10,SMMA) level

Re: 2 MOVING AVERAGE AND SUPERTREND STRATEGY AND ALERT

PostPosted: Fri Aug 23, 2019 5:34 am
by Apprentice
2 MOVING AVERAGE AND SUPERTREND STRATEGY v2.lua
(127.83 KiB) Downloaded 369 times

Try this version.

Re: 2 MOVING AVERAGE AND SUPERTREND STRATEGY AND ALERT

PostPosted: Mon Aug 26, 2019 12:35 pm
by SerifKocdemir
Thank you so much It look super job.
I tried over and over but I couldn't run :(

Strategy show this alert

''C:/Program Files (x86)/Candleworks/FXTS2/Strategies/Custom/2 MOVING AVERAGE AND SUPERTREND STRATEGY v2 (1).lua:114: attempt to index field 'UP' (a nil value)''


I dont understand where is the problem

Re: 2 MOVING AVERAGE AND SUPERTREND STRATEGY AND ALERT

PostPosted: Tue Aug 27, 2019 7:39 am
by Apprentice
Your request is added to the development list.
Internal developer reference 13.

Re: 2 MOVING AVERAGE AND SUPERTREND STRATEGY AND ALERT

PostPosted: Thu Aug 29, 2019 5:26 am
by Apprentice
There are several version of the super trend on fxcodebase.
You are using the wrong one.
This is the correct one: viewtopic.php?f=17&t=605

Re: 2 MOVING AVERAGE AND SUPERTREND STRATEGY AND ALERT

PostPosted: Sat Aug 31, 2019 8:43 am
by SerifKocdemir
It is working :)
Thank you so much.
Actually Strategy make more jobs than I think. :)

It is possible to exterminate these more jobs
Strategy when start to long several times ''enter long'' and when start to short sevrel times ''enter short'' , :(

Can you make The strategy;
If Strategy have long position, Strategy must not add/enter another/other long position before close existing long position.
and
If Strategy have short position, Strategy must not add/enter another/other short position before close existing short position.
You are really good at your job.
Thank you so much again.

Re: 2 MOVING AVERAGE AND SUPERTREND STRATEGY AND ALERT

PostPosted: Sun Sep 01, 2019 5:14 am
by Apprentice
Capture.PNG
Capture.PNG (2.95 KiB) Viewed 1856 times

Set "Position Cap" to yes.