Notifications
Clear all

Midway Scalping Strategy

Mike
 Mike
(@vanguardai)
Co-Founder Admin

This strategy gets the high and low for the past 30 periods and computes the midway buy zone. If prices closes within the buyzone, it will trigger a buy signal. However, it will only do so if the ALMA is downward sloping, meaning prices (should be) are pulling back from a previous rally.

A sell signal is triggered if prices hits the 30 period high or low. While the backtest looks good, the user can adjust and optimize this strategy more. My suggestion is to make the selling a bit more sensitive, add risk management and/or make the lookback period longer/shorter based on your preference. You can also use the slope function if you want the filter to be less sensitive.

 

// Midway Scalps

//Set Variables
Set ALMA = alma(close,9,.85,6)
Set Topping = max(high,30)
Set Bottom = Min(low,30)
Set 50level = (topping+bottom)/2
Set top = 50level*1.005
Set bot = 50level*.995
//Set Filter = slope(alma,2) < 0
Set Filter = alma < ref(alma,1)

//Set Conditions
Set Buy = close <top and close>bot and filter
Set sell = close >= topping or close <=bottom

plotbuysell(buy,sell,green,red,main)
//plot(buy,buy,green,main)
//plot(sell,sell,red,main)
plotrange(top,bot,green,main)
plot(topping,step,cyan,main)
plot(bottom,step,cyan,main)
signals(buy,sell)

1619602463-Midway-Scalps.png
1619602489-Midway-Scalps-Backtest.png
Quote
Topic starter Posted : 28/04/2021 5:34 pm
Share: