
-
This is a short only strategy that does really well on large time frames.
The defaults work well on BTC_USD on the 1 hour time frame.
Its important to note on a 1 year backtest only about 16 trades occur. Meaning that this bots orders are statistically insignificant but feel free to try it out.
-
This topic was modified 1 year, 8 months ago by
r4stl1n.
Related Scripts From This Author
-
This topic was modified 1 year, 8 months ago by
-
HaasOnline Black Friday Sale Promotion Type: Sale Expires: December 7, 2023 24:00 UTCFor a limited-time get up to 50% off monthly and 30% off annual plans.
-
-
May 21, 2022 at 3:09 PM #3030
romdisc
Basic::This is much more cleaner:
`lua
— [r4stl1n] Triple VWAP Trend Rider
—
— This strategy utilizes the VWAP_Window function to
— execute shorts when conditions are meet——————————–
— You are on your own with this script
——————————–
— ~Bored and programming~HideOrderSettings()
— Wrap our entire strategy in the OptimizedForInteral
— To ensure our strat only runs on new complete candles
rsiLength = Input (“RSI Length”, 60,””)
rsiShortLevel = Input(“RSI Short”,30,”RSI Short Level”,””)ppoShort = Input(“POI Short”,9,”POI Short Level”,””)
ppoLong = Input(“POI Long”,26,”POI Long Level”,””)
ppoSignal = Input(“POI Signal”,-1,”POI Signal”,””)vwapWindowOne = Input(“VWAP Window One”,20,”VWAP Window Size”,”VWAP Settings”)
vwapWindowTwo = Input(“VWAP Window Two”,60,”VWAP Window Size”,”VWAP Settings”)
vwapWindowThree = Input(“VWAP Window Three”,250,”VWAP Window Size”,”VWAP Settings”)— First we grab a day candles
OptimizedForInterval(0, function()local vwap20 = CC_VWAPWindow(vwapWindowOne)
local vwap60 = CC_VWAPWindow(vwapWindowTwo)
local vwap250 = CC_VWAPWindow(vwapWindowThree)local rsi = RSI(ClosePrices(),rsiLength)
local ppo = PPO(ClosePrices(),ppoShort,ppoLong,EmaType)if vwap250[3] != nil
and CurrentPrice().close < vwap250[1] and GetPositionDirection() != PositionShort
and vwap20[1] < vwap60[1]
and vwap60[1] < vwap250[1]
and ppo[1] <= ppoSignal
and rsi > rsiShortLevel
and vwap250[1] < vwap250[12]
then
PlaceGoShortOrder(0,TradeAmount(), {type=MarketOrderType, note=’S’})
endif GetPositionDirection() == PositionShort
and vwap60[1] >= vwap250[1]
PlaceExitShortOrder(0,TradeAmount(), {type=MarketOrderType, note=’E’})
endPlot(0, “vwap20”, vwap20, {c=Cyan})
Plot(0, “vwap60”, vwap60, {c=Red})
Plot(0, “vwap250”, vwap250, {c=Green})Plot(1, “RSI Level”,rsi)
Plot(2, “PPO Level”,ppo)end)
`
-
June 3, 2022 at 7:20 PM #3078
Kobalt
Basic::Cool Looking at above trades [if the first position was kept vs exits, re-entry]
Are you [like me] also still are tackling the same hurdle:
How to NOT close your Short [only reduce to a minimum 1x leverage cross] until bullish confirmation (increase BTC and hedge its USD] or have a re entry mechanism SL for the minimum portion of your accounts equity?
Have closed it too often and was ‘naked’ ‘long unnecessary . very deja vu isn’t it? ;p-
June 3, 2022 at 7:30 PM #3079
Kobalt
Basic::Arguably both are just as clean
I think this for me gives a clear view of what you would achieve with IfElseIf chains in VE and especially the levels you need to end :—
”’ if CurrentPrice().close < vwap250[1] and GetPositionDirection() != PositionShort
then
if vwap20[1] < vwap60[1]
then
if vwap20[1] < vwap250[1]
then
if vwap60[1] < vwap250[1]
then
if ppo[1] <= ppoSignal
then
if rsi > rsiShortLevel
then
if vwap250[1] < vwap250[12]
then
PlaceGoShortOrder(0,TradeAmount(), {type=MarketOrderType, note=’S’})
end
end
end
end
end
end
end
end”’-
This reply was modified 1 year, 6 months ago by
Kobalt.
-
This reply was modified 1 year, 6 months ago by
-
-