HMA HA Strategy

アップデート済
So I found a heikin ashi strategy that was roughly 10% profitable at certain points, and thought to myself, "hey I can flip this and make it 90% profitable" right?
well not really haha. So I added a HMA to the mix and also stop loss function and it turned out ok. This works with alt coins as well
The only issue I have with it, is the exits are too early. so I need to figure out what I could use, so it runs a bit more.
Side note, this is a long only strategy, Ive turned off shorts. Works best on 3 hour time frame, but there is success from 30 min up to 4 hour.

If you use this, like this please give me reputation, Id LOVE to message other users on this platform and connect.

Also let me know if this works for you too, Itd be good to know if others make money from it, so I can start making money too haha
コメント
//version=4
strategy(title="Heikin Ashi, Hull Moving Average Strategy", shorttitle="HA, HMA Strategy", overlay=true, initial_capital = 1000, currency='USD', default_qty_value=1000, default_qty_type=strategy.cash, commission_type=strategy.commission.percent , commission_value=0.1, pyramiding=1)
UseHAcandles = input(true, title="Use Heikin Ashi Candles in Algo Calculations")
// === BASE FUNCTIONS ===
HA_Close = UseHAcandles ? security(heikinashi(syminfo.tickerid), timeframe.period, close) : close
HA_Open = UseHAcandles ? security(heikinashi(syminfo.tickerid), timeframe.period, open) : open
HA_High = UseHAcandles ? security(heikinashi(syminfo.tickerid), timeframe.period, high) : high
HA_Low = UseHAcandles ? security(heikinashi(syminfo.tickerid), timeframe.period, low) : low
//Hull
//
//Length represents timeframe, adjust as required below.
//55 = 30 min
//110 = 1 hour
//440 = 4 hour
//2640 = Daily
//
//Profitable length
//30 min=65, 1 hour=60, 2 hour=40, 3 hour=100, 4 hour=68
length = input(65, minval=1)
src = input(close, title="Source")
HMA = wma(2*wma(src, length/2)-wma(src, length), floor(sqrt(length)))
plot(HMA)
// Stop loss
stoploss_input = input(5, step=0.1, title='Stop Loss %', type=input.float, minval=0.01)/100
stoploss_level = strategy.position_avg_price * (1 - stoploss_input)
plot(stoploss_input and stoploss_level ? stoploss_level: na, color=color.red, style=plot.style_linebr, linewidth=2, title="Stop loss")
//Rules
Entry = HA_Close < HA_Open and HA_Close < HA_Low[8] and close > HMA
Exit = HA_Close > HA_High[4] and HA_Close > HA_Open and HA_High[4] > HA_High[8]
//Trades
strategy.entry("long", long=true, when=Entry, comment = "Entry")
strategy.close("long", when=Exit, comment = "Exit" )
strategy.exit("S/L", "long", stop=stoploss_level)
Technical Indicators

免責事項