Hello all,
What I want to see is this:
A Cycle Low is the period when the MACD < Signal line. It starts when the MACD crosses under the Signal line and ends when the MACD crosses over the Signal line. The MACD Cycle Lowest is the Lowest MACD during that Cycle Low, measured after the Cycle has finished,
I want a Signal when:
– a bullish candle crosses over the bullish SMA50at the close of the candle and
– the MACD at that > previous MACD Cycle Lowest and
– the MACD at that moment =< Signal line and
– the price low at that moment > price low at the previous MACD Cycle Lowest.
Where I fail is how to describe the period of the cycle low from the MACD, the start and the end and how to define the lowest MACD and the the lowes price in that MACD-period.
I only have the long version here to keep it readable. When it works I will complete it with the short version included.
Thanks a lot,
Marc
// Higher Lows Price in sync with Higher Low MACD
//indicators SMA50 and MACD
MA = Average[50]
LM = MACDline[12,26,9]
//CCL = CONDITIONS CANDLES IN RELATION TO AVERAGE FOR LONG POSITION
//bullish candle crosses over bullish Average.
C1 = ma[1] =< ma and open < m50 and close > m50
// The body of the previous candle needs to be below the Average
C2 = open[1] < m50 and close[1] < m50
CCL = c1 and c2
// CYCLE LOW MACD (MCL), the lowest MACD in the period when MACD < Signalline
// Comparing MACD in a next running CYCLE LOW at a close of a bar with the previous CYCLE LOW.
// START MCL
MD1 = LM(close) =< Signalline and LM[1] > LM(close)
If MD1 then MCL = 1
//END OF CYCLE LOW MACD
MD2 = LM(close) => Signalline and LM[1] < LM(close)
If MD2 then MCL = 0
//DEFINING MACD CYLCE LOWEST, MDLST
MCLST = MCL [lowest]
//MACD higher low
MHL = [MCLST][1] < MCL
//PRICE, PHL is PRICE LOW > PRICE LOW AT THE PREVIOUS,
PHL = low > low [MCLST]
// SIGNAL LONG
If CCA and MHL and PHL then
DRAWSEGMENT (barindex, close+1.7, barindex, close+2.2)COLOURED(0,250,0)
DRAWSEGMENT (barindex, close+1.7, barindex+1, close+1.7)COLOURED(0,250,0)
DRAWTEXT("1.7", barindex-1, close+1.7, Dialog, Standard, 10) COLOURED(0,0,0)
DRAWSEGMENT (barindex, close+2.2, barindex+1, close+2.2)COLOURED(0,250,0)
DRAWTEXT("2.2", barindex-1, close+2.2, Dialog, Standard, 10) COLOURED(0,0,0)
DRAWSEGMENT (barindex, close+1, barindex+1, close+1)COLOURED(100,100,100)
DRAWSEGMENT (barindex, close+1.7, barindex, close+1)COLOURED(100,100,100)
DRAWTEXT("1.0", barindex-1, close+1, Dialog, Standard, 10) COLOURED(100,100,100)
DRAWTEXT("F1", barindex, close+2.8, Dialog, Standard, 14) COLOURED(0,250,0)
DRAWSEGMENT (barindex, close-sl, barindex+1, close-sl)COLOURED(250,0,100)
DRAWSEGMENT (barindex, close-(sl-0.25), barindex, close-sl)COLOURED(250,0,100)
endif
endif
endif
return