Hi Optuma
I have two scripts that work well individually but I am trying to combine the two into one showview or showbar script. Basically I would like to find a particular candle closing below its highs and occurring within the last 10 days. I then want to find the last candle, which must close at its highs and be the first candle to close at its highs in the last 20 days and be the widest range candle in last 7 days (ie a wide range bullish marubozu candle).
Here’s the script I have so far, but it does not show any results when I put it into showview, so clearly I am doing something wrong. As always any assistance would be very helpful, thank you.
//First signal - Candle type occurring within last 10 days;
V5 = BARTYPES(DEFAULT=CloseBelowMid) and BARTYPES(DEFAULT=CloseAboveOpen) and MA(BARS=8, STYLE=Exponential) > MA(BARS=15, STYLE=Exponential) and TIMESINCESIGNAL()<10;
//2nd Signal - Candle close at high last bar;
V4 = CandlestickPattern(SCANTYPE=[Bullish White Marubozu,Bullish Closing White Marubozu,Bullish Opening White Marubozu]) Matches;
//Widest bar in last 7 days;
V1 = HIGH() - LOW() ;
V2 = HIGHESTHIGH(V1, BARS=7, INCBAR=True);
V3 = V1 == V2;
V3 and V4 and V5;
//Marubozu first occurence in last 20 days;
NOREPEAT(V4, BARS=20);