Can somebody help me setup the following thinkscrips code/scan, TOS lacks additional conditions
I just want to scan for:
Candle that make high over previous day high of day, yet closes under it.
or
Make low below previous day low of day, and closes over it.
Thats it! TOS custom candle pattern builder is missing the integration with the previous high of day study or any studies for that matter.
If I want to scan for 3 ascending candles, yet over vwap, its impossible to incorporate any indicators into the candle scanner.
See if this helps
Ruby:def ymd = GetYYYYMMDD(); def candles = !isnan(close); def capture = candles and ymd != ymd[1]; def dayCount = CompoundValue(1, if capture then dayCount[1] + 1 else dayCount[1], 0); def thisDay = (HighestAll(dayCount) - dayCount) ; def phd = if thisday==0 then double.nan else if thisday== 1 and secondsfromTime(0930)== 0 then high else if thisday==1 then Max(high, phd[1]) else phd[1]; def phdext = if IsNaN(phd) then phdext[1] else phd; def ph = phdext; def cond1 = if thisday==0 and open > phdext then 1 else 0; def cond2 = if thisday==0 then if cond1 == 1 and close < phdext then 1 else 0 else 0; def pld = if thisday==0 then double.nan else if thisday == 1 and secondsFromTime(0930) == 0 then low else Min(low, pld[1]); def pldext = if IsNaN(pld) then pldext[1] else pld; def pl = pldext; def cond1a = if thisday == 0 and open < pldext then 1 else 0; def cond2a = if thisday == 0 then if cond1a == 1 and close > pldext then 1 else 0 else 0; plot scan = (cond1a == 1 and cond2a == 1) or (cond1 == 1 and cond2 == 1);