Hello, new trader here looking for feedback on a trading system I developed. I say developed but this idea is not original as its just bits and pieces I’ve collected that seem to work well together. This is how I wrote it down in my trade journal so if anyone needs clarification on things let me know.
Trending markets - 4HR timeframe
Buy on 10EMA cross above 20MA and ADX > 25
Sell on 10EMA cross below 20MA and ADX > 25
-Hit stop loss which will be placed at low or high of previous day depending on short or long. Invalidating reasoning behind entering trade.
-On next cross of 20MA by 10EMA
-On ADX drop below 25 and or EMA and MA coming together and running parallel indicating a slowing of the trend, potential trend change, or move into a range.
[U]Transition to range[/U] - 1HR timeframe
draw range boundaries based on key support and resistance levels. Switch to 1HR chart. Buy/sell based on EMA and MA crosses. Do not look to ADX for validation
I’m currently working on a script in tradeview that will allow me to back test this more thoroughly. Having trouble getting the trades to execute at the crosses when they should and as frequently as they should. Sometimes the lines cross and the ADX is > 25 and the script just doesn’t execute a trade.
Here is the code so far:
adxlen = input(14, title=“ADX Smoothing”)
dilen = input(14, title=“DI Length”)
up = change(high)
down = -change(low)
truerange = rma(tr, len)
plus = fixnan(100 * rma(up > down and up > 0 ? up : 0, len) / truerange)
minus = fixnan(100 * rma(down > up and down > 0 ? down : 0, len) / truerange)
adx(dilen, adxlen) =>
[plus, minus] = dirmov(dilen)
sum = plus + minus
adx = 100 * rma(abs(plus - minus) / (sum == 0 ? 1 : sum), adxlen)
//ADX+crossover Strategy Long Entry
longEntry1 = crossover(ema(close, 10), sma(close, 20))
longEntry2 = adx(14, 14) > 25
longCondition1 = longEntry1 and longEntry2
//ADX+crossover Strategy Short Enter
shortEntry1 = crossunder(ema(close, 10), sma(close, 20))
shortEntry2 = adx(14, 14) > 25
shortCondition1 = shortEntry1 and shortEntry2