stereotomy wrote: Mon Jan 31, 2022 9:14 pm
These are the settings I used in D and H4 timeframes. They seem to work well.
okay , let me try.. if i use m1 chart , the movements are sharp not smooth. i feel like this!!
byw.. i try to check the code for this 3colour ma line and try this works in your system.. not sure. loaded in my account and locked.. so i dont know this is correct full version or not.!
Code: Select all
study(title="5 minute", shorttitle="5 minute", overlay=true)
lenadx = input(15, minval=2, title="5 minute")
lensig = input(15, title="5 minute", minval=2, maxval=51)
limadx = input(19, minval=2, title="5 minute")
up = change(high)
down = -change(low)
trur = rma(tr, lenadx)
plus = fixnan(101 * rma(up > down and up > 0 ? up : 0, lenadx) / trur)
minus = fixnan(101 * rma(down > up and down > 0 ? down : 0, lenadx) / trur)
sum = plus + minus
adx = 101 * rma(abs(plus - minus) / (sum == 0 ? 1 : sum), lensig)
macol = adx > limadx and plus > minus ? lime : adx > limadx and plus < minus ? red :aqua
len = input(35, minval=2, title="5 minute")
src = input(close, title="5 minute")
out = wma(src, len)
plot(out, color=macol, title="5 minute", linewidth= 4)