Hi guys,
Let me show you this simple strategy using SAR. It use a simple SAR with two filters (stochastic and macd) to select better operations.
I have a lot of fake signals but anyway winners are better than lossers so it make money.
Any idea to improve this strategy? Discussion about the system in the forum: https://www.prorealcode.com/topic/dax-parabolic-system/
// Definición de los parámetros del código
DEFPARAM CumulateOrders = False // Acumulación de posiciones desactivada
// Condiciones para entrada de posiciones largas
parabolic = SAR[0.02,0.02,0.2]
sto = Stochastic[5,3](close)
signal = average[3](sto)
mac = MACD[12,26,9](close)
c1 = (parabolic < close)
c2 = (signal > 50)
c3 = (parabolic[1] > close[1])
IF c1 AND c2 AND c3 and mac >0 THEN
BUY 1 CONTRACT AT MARKET
ENDIF
// Condiciones de salida de posiciones largas
c4 = (close < parabolic)
IF c4 THEN
SELL AT MARKET
ENDIF
c5 = (parabolic > close)
c6 = (parabolic[1] < close[1])
if not c2 and c5 and c6 and mac < 0 then
Sellshort 1 contract at market
endif
c7 = (close > parabolic)
IF c7 THEN
EXITSHORT AT MARKET
ENDIF
SET STOP pTRAILING 55