Scan using Heiken Ashi candle and WilliamsPercentR


Category:
0
0

Hi Pete,

I did as you instructed me, went to the drawing board. This is what I think will help me.

Heiken Ashi candles

Williams % R indicator, AccumDistPrVol indicator

FIRST:

IF Candle 1 top is higher than Candle 2 top,  AND Candle 1 W%R is smaller than Candle 2 W%R( negative number) that is a signal to be checked.

SECOND:

IF Candle 1 BOTTOM is lower than Candle 2 bottom,  AND Candle 1 W%R is bigger than Candle 2 W%R( negative number) that is a signal to be checked.

 

Attachments:
Marked as spam
Posted by (Questions: 3, Answers: 4)
Asked on April 14, 2020 4:12 am
274 views
0
Private answer

If not for the Heiken-Ashi candles we could build this using the Condition Wizard. The first step is to build the Heiken-Ashi candles for the scan. For that I will simply steal some code from a previous solution:

https://www.hahn-tech.com/ans/two-consecutive-green-heikin-ashi-candles/

Then we combine the first several lines from that solution with the code from Thinkorswim for the WilliamsPercentR. Last few lines contain your scan signals:

input length = 10;
def highestHigh = Highest(high, length);
def lowestLow = Lowest(low, length);
def result = if highestHigh == lowestLow then -100 else (highestHigh - close) / (highestHigh - lowestLow) * (-100);
def williamsPercentR = if result > 0 then 0 else result;
def haClose = ohlc4;
def haOpen = if haOpen[1] == 0 then haClose[1] else (haOpen[1] + haClose[1]) / 2;
def haHigh = Max(high, Max(haClose, haOpen));
def haLow = Min(low, Min(haClose, haOpen));
# first scan signal
plot scan = high < high[1] and williamsPercentR > williamsPercentR[1];
# second scan signal
#plot scan = low > low[1] and williamsPercentR < williamsPercentR[1];

Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on April 14, 2020 7:17 am