hi everyone , can someone please program this for me , just so i know how its done simple moving average strategy should be easy.
-
moving averages .. - ( 5>7 ) ( 7>9 ) & ( 9>20 )
last candle. open>20 close>20 open<9 close<9 low<20
current candle open<9 close >5
moving average current is < m.a 1&2 candles ago.like a ma squeeze and breakout.
thanks if any one can show me how its done and i will learn by seeing it.
-
@mcarl42 said in hi everyone , can someone please program this for me , just so i know how its done simple moving average strategy should be easy.:
open>20 close>20 open
In order to understand what you mean, I put the MAs on the chart and try to find the conditions you describe. Following colors for MAs:
blue - SMA(5)
yellow - SMA(7)
orange - SMA(9)
red - SMA(20)
Is MA(7) really necessary?
-
@trader-philipps no guess not , just want to figure out the ma squeeze and break.
yes that looks right on the chart . thanks heaps very grateful. -
@mcarl42 I'm afraid, my example didn't fit totally all conditions. It misses "last candle. open>20 close>20 open<9 close<9 low<20". As it is hard to spot any condition on several charts that meet all your stated conbditions, I think it will be very rare occuring. Even on higher timeframes the space between MA(9) and MA(20) is quiet small to fit an entire candle inside.
-
@trader-philipps ok leave out the last candle . current candle opens (< 9) ( >20 )
and ma 5 is less than it was 1&2 candles ago but still above the 9.
; ) ; )
-
@trader-philipps https://fxdreema.com/shared/qOFzPGvHb
this is my interpretation . i dunno but couldnt get a backtest on it , maybe live will work.
will this work ??
-
@mcarl42 Well, that's my interpretation of what you wrote https://fxdreema.com/shared/TLBXNyoW but in BT it doesn't open any trade.
Could you please refine your requirements especially on which candle ID which condition should be met? As I use candle ID0 (current candle) only for trade actions, all other condition must be met on previous candles (ID1, ID2)
For example:
ID1: MA5>MA7
ID1: MA7>MA9
ID1: MA9>MA20and so on.
What I didn't understand is the requirement (moving average current is < m.a 1&2 candles ago.) Which MA you are refering to?
-
right that makes sence to use ID0 like that.
what i meant about the ma squeeze more visible when using ema's.
ID1- ma 5 < ma 5 ID2 & ma ID1 ma 5 < ma 5 ID2 while > ma 9 for all past 3 candles .thanks & is that a custom block the constants in it , i have to look up tutorial on constants lots easier.
-
@mcarl42 The constants you can set in EA settings. So you can coose for instance the MA type where 0 is SMA, 1 is EMA, etc..
-
@trader-philipps gotcha. is i possible for me to write a scipt on fxdreema so i can see if ea works as designed . thanks for the help.