Moderator: admin
Apprentice wrote:
TAO= MA1-MA2
Centred moving average is one of the moving averages used.
As Centered moving average repaint,
when CMA is used, TAO will also repaint.
However i have included Static / Dynamic Mode Selector also.
Value for CMA1 = N
Value for CMA2 = 2*N , TAO1=CMA1-CMA2
Value for CMA3 = 4*N , TAO2=CMA2-CMA3
Value for CMA4 = 8*N , TAO3=CMA3-CMA4
Period = 4*N
Maximum = MAX[PERIOD](close)
Minimum = MIN[PERIOD](close)
G = (CMA2 + CMA3 + CMA4) /3
IF close > G then
C = 1
else C = 0
Endif
IF CMA2 < CMA2[1] then
C1 = 1
Else C1 = 0
Endif
IF CMA3 < CMA3[1] then
C2 = 1
Else C2 = 0
Endif
IF CMA4 < CMA4[1] then
C3 = 1
Else C3 = 0
Endif
X = C1 + C2 + C3
IF X = 2 and C = 1 and not short on market then
sell 1 lot
Target = G
Endif
IF X = 3 and C = 1 then
sell 2 lots
Target = 2* G - MAXIMUM
Endif
The same for long with condition ">" in place of "<", and C = 0 and MINIMUM in place of MAXIMUM to calculate Target when buy 2 lots.
Apprentice wrote:Yes, this is possible.=
But i am not sure, CMA is best choice.
Because CMA repaints,
Historical, backtest is meaningless,
>Gtrading, in current (last) period is possible...
But I guess with lot of changes in indications.
Write trading algorithm conditions, we can try...
Users browsing this forum: No registered users and 187 guests