StockFetcher Forums · General Discussion · PRICE ACTION STATE CHANGE<< 1 2 3 >>Post Follow-up
TheRumpledOne
6,409 posts
msg #160205
Ignore TheRumpledOne
3/28/2023 3:25:28 PM

"Too bad there isn't a way to backtest this to find out how much the avg move is before it ends."

There is nothing to "backtest".

The filter identifies state changes or state continuations.



TheRumpledOne
6,409 posts
msg #160206
Ignore TheRumpledOne
modified
3/28/2023 3:26:50 PM

When price does not change state "something" is continuing to happen.

Submit
Fetcher[
/* PRICE ACTION NO STATE CHANGE */
/* Copyright 2023 by Avery T. Horton, Jr. aka The Rumpled One */
/* Permission to use PRICE ACTION STATE CHANGE within StockFetcher Granted */
/* Permission to publish or post on any other forum DENIED */
/* ----------------------------------------------------------------*/


/* CALCULATIONS */
set{CCb,days(close is above close 1 day ago,100)}
set{CCa,days(close is below close 1 day ago,100)}
set{ClxCl, CCa - CCb}

set{E5b,days(close is above ema(5),100)}
set{E5a,days(close is below ema(5),100)}
set{CxEma5, E5a - E5b}

/* CALCULATIONS */

set{xHH,count(high is above high 1 day ago,1)}
set{xLL,count(low is below low 1 day ago,1)}

set{xHH1,count(high 1 day ago is above high 2 days ago,1)}
set{xLL1,count(low 1 day ago is below low 2 days ago,1)}

set{xLH,count(high is below high 1 day ago,1)}
set{xHL,count(low is above low 1 day ago,1)}

set{xLH1,count(high 1 day ago is below high 2 day ago,1)}
set{xHL1,count(low 1 day ago is above low 2 day ago,1)}

set{HH, xHH * xHL }
set{LL, xLL * xLH }
set{IB, xLH * xHL }
set{OB, xHH * xLL }

set{HH1, xHH1 * xHL1 }
set{LL1, xLL1 * xLH1 }
set{IB1, xLH1 * xHL1 }
set{OB1, xHH1 * xLL1 }

set{HHHLdays,days(HH equals 1 1 day ago ,100)}
set{LHLLdays,days(LL equals 1 1 day ago ,100)}
set{IBdays,days(IB equals 1 1 day ago ,100)}
set{OBdays,days(OB equals 1 1 day ago ,100)}

Set{p1, OB * 1}
Set{p2, IB * 10}
Set{p3, LL * 100}
Set{p4, HH * 1000}

Set{pa, p1 + p2}
Set{pb, p3 + p4}
Set{STATE0, pa + pb}


Set{p1x, OB1* 1}
Set{p2x, IB1 * 10}
Set{p3x, LL1 * 100}
Set{p4x, HH1 * 1000}

Set{pax, p1x + p2x}
Set{pbx, p3x + p4x}
Set{STATE1, pax + pbx}



Set{STATE , STATE0 - STATE1}

and add column separator
and add column HHHLdays
and add column LHLLdays
and add column IBdays
and add column OBdays

and add column separator

and add column STATE0



and add column clxcl
and add column CxEma5



add column industry

/* SELECTION CRITERIA */

IB equal 1

volume above 1000000

sort column 6 descending

draw STATE
]



TheRumpledOne
6,409 posts
msg #160207
Ignore TheRumpledOne
3/28/2023 3:33:02 PM

Some things to remember...

"Lower Low and lower high" is NOT the same as Lower Low. Ditto for Higher High and Higher Low vs Higher High.

Outside bars produce both higher highs and lower lows.

HHHLdays and LHLLdays show how many days a stock is "trending". A state change after a "trend" may indicate a reversal is likely.










TheRumpledOne
6,409 posts
msg #160208
Ignore TheRumpledOne
modified
3/28/2023 3:51:50 PM

What happens when state changes from HH to LL?

Fetcher[
/* PRICE ACTION STATE CHANGE HH to LL */
/* Copyright 2023 by Avery T. Horton, Jr. aka The Rumpled One */
/* Permission to use PRICE ACTION STATE CHANGE within StockFetcher Granted */
/* Permission to publish or post on any other forum DENIED */
/* ----------------------------------------------------------------*/


/* CALCULATIONS */
set{CCb,days(close is above close 1 day ago,100)}
set{CCa,days(close is below close 1 day ago,100)}
set{ClxCl, CCa - CCb}

set{E5b,days(close is above ema(5),100)}
set{E5a,days(close is below ema(5),100)}
set{CxEma5, E5a - E5b}

/* CALCULATIONS */

set{xHH,count(high is above high 1 day ago,1)}
set{xLL,count(low is below low 1 day ago,1)}

set{xHH1,count(high 1 day ago is above high 2 days ago,1)}
set{xLL1,count(low 1 day ago is below low 2 days ago,1)}

set{xLH,count(high is below high 1 day ago,1)}
set{xHL,count(low is above low 1 day ago,1)}

set{xLH1,count(high 1 day ago is below high 2 day ago,1)}
set{xHL1,count(low 1 day ago is above low 2 day ago,1)}

set{HH, xHH * xHL }
set{LL, xLL * xLH }
set{IB, xLH * xHL }
set{OB, xHH * xLL }

set{HH1, xHH1 * xHL1 }
set{LL1, xLL1 * xLH1 }
set{IB1, xLH1 * xHL1 }
set{OB1, xHH1 * xLL1 }

set{HHHLdays,days(HH is below 1 1 day ago,100)}
set{LHLLdays,days(LL is below 1 1 day ago,100)}


Set{p1, OB * 1}
Set{p2, IB * 10}
Set{p3, LL * 100}
Set{p4, HH * 1000}

Set{pa, p1 + p2}
Set{pb, p3 + p4}
Set{STATE0, pa + pb}


Set{p1x, OB1* 1}
Set{p2x, IB1 * 10}
Set{p3x, LL1 * 100}
Set{p4x, HH1 * 1000}

Set{pax, p1x + p2x}
Set{pbx, p3x + p4x}
Set{STATE1, pax + pbx}



Set{STATE , STATE0 - STATE1}

and add column separator
and add column HHHLdays
and add column LHLLdays
and add column separator

and add column STATE0



and add column clxcl
and add column CxEma5



add column industry

/* SELECTION CRITERIA */

HH1 equal 1
LL equal 1

volume above 1000000

sort column 6 descending

draw STATE
]



TheRumpledOne
6,409 posts
msg #160209
Ignore TheRumpledOne
modified
3/28/2023 3:55:20 PM

What happens when state changes from LL to HH?

Submit
Fetcher[
/* PRICE ACTION STATE CHANGE LL to HH */
/* Copyright 2023 by Avery T. Horton, Jr. aka The Rumpled One */
/* Permission to use PRICE ACTION STATE CHANGE within StockFetcher Granted */
/* Permission to publish or post on any other forum DENIED */
/* ----------------------------------------------------------------*/


/* CALCULATIONS */
set{CCb,days(close is above close 1 day ago,100)}
set{CCa,days(close is below close 1 day ago,100)}
set{ClxCl, CCa - CCb}

set{E5b,days(close is above ema(5),100)}
set{E5a,days(close is below ema(5),100)}
set{CxEma5, E5a - E5b}

/* CALCULATIONS */

set{xHH,count(high is above high 1 day ago,1)}
set{xLL,count(low is below low 1 day ago,1)}

set{xHH1,count(high 1 day ago is above high 2 days ago,1)}
set{xLL1,count(low 1 day ago is below low 2 days ago,1)}

set{xLH,count(high is below high 1 day ago,1)}
set{xHL,count(low is above low 1 day ago,1)}

set{xLH1,count(high 1 day ago is below high 2 day ago,1)}
set{xHL1,count(low 1 day ago is above low 2 day ago,1)}

set{HH, xHH * xHL }
set{LL, xLL * xLH }
set{IB, xLH * xHL }
set{OB, xHH * xLL }

set{HH1, xHH1 * xHL1 }
set{LL1, xLL1 * xLH1 }
set{IB1, xLH1 * xHL1 }
set{OB1, xHH1 * xLL1 }

set{HHHLdays,days(HH is below 1 1 day ago,100)}
set{LHLLdays,days(LL is below 1 1 day ago,100)}


Set{p1, OB * 1}
Set{p2, IB * 10}
Set{p3, LL * 100}
Set{p4, HH * 1000}

Set{pa, p1 + p2}
Set{pb, p3 + p4}
Set{STATE0, pa + pb}


Set{p1x, OB1* 1}
Set{p2x, IB1 * 10}
Set{p3x, LL1 * 100}
Set{p4x, HH1 * 1000}

Set{pax, p1x + p2x}
Set{pbx, p3x + p4x}
Set{STATE1, pax + pbx}



Set{STATE , STATE0 - STATE1}

and add column separator
and add column HHHLdays
and add column LHLLdays
and add column separator

and add column STATE0



and add column clxcl
and add column CxEma5



add column industry

/* SELECTION CRITERIA */

LL1 equal 1
HH equal 1

price above 10
volume above 1000000

sort column 6 descending

draw STATE
]



TheRumpledOne
6,409 posts
msg #160210
Ignore TheRumpledOne
modified
3/28/2023 4:11:44 PM

DAYS SINCE INSIDE BAR

Fetcher[
/* PRICE ACTION STATE CHANGE - DAYS SINCE INSIDE BAR */
/* Copyright 2023 by Avery T. Horton, Jr. aka The Rumpled One */
/* Permission to use PRICE ACTION STATE CHANGE within StockFetcher Granted */
/* Permission to publish or post on any other forum DENIED */
/* ----------------------------------------------------------------*/


/* CALCULATIONS */
set{CCb,days(close is above close 1 day ago,100)}
set{CCa,days(close is below close 1 day ago,100)}
set{ClxCl, CCa - CCb}

set{E5b,days(close is above ema(5),100)}
set{E5a,days(close is below ema(5),100)}
set{CxEma5, E5a - E5b}

/* CALCULATIONS */

set{xHH,count(high is above high 1 day ago,1)}
set{xLL,count(low is below low 1 day ago,1)}

set{xHH1,count(high 1 day ago is above high 2 days ago,1)}
set{xLL1,count(low 1 day ago is below low 2 days ago,1)}

set{xLH,count(high is below high 1 day ago,1)}
set{xHL,count(low is above low 1 day ago,1)}

set{xLH1,count(high 1 day ago is below high 2 day ago,1)}
set{xHL1,count(low 1 day ago is above low 2 day ago,1)}

set{HH, xHH * xHL }
set{LL, xLL * xLH }
set{IB, xLH * xHL }
set{OB, xHH * xLL }

set{HH1, xHH1 * xHL1 }
set{LL1, xLL1 * xLH1 }
set{IB1, xLH1 * xHL1 }
set{OB1, xHH1 * xLL1 }

set{HHHLdays,days(HH is below 1 1 day ago,100)}
set{LHLLdays,days(LL is below 1 1 day ago,100)}
set{IBdays,days(IB is below 1 1 day ago,100)}
set{OBdays,days(OB equals 1 1 day ago ,100)}

Set{p1, OB * 1}
Set{p2, IB * 10}
Set{p3, LL * 100}
Set{p4, HH * 1000}

Set{pa, p1 + p2}
Set{pb, p3 + p4}
Set{STATE0, pa + pb}


Set{p1x, OB1* 1}
Set{p2x, IB1 * 10}
Set{p3x, LL1 * 100}
Set{p4x, HH1 * 1000}

Set{pax, p1x + p2x}
Set{pbx, p3x + p4x}
Set{STATE1, pax + pbx}



Set{STATE , STATE0 - STATE1}

and add column separator
and add column HHHLdays
and add column LHLLdays
and add column IBdays
and add column OBdays
and add column separator

and add column STATE0



and add column clxcl
and add column CxEma5



add column industry

/* SELECTION CRITERIA */

OB1 equal 1
IB equal 1

price above 5
volume above 1000000

sort column 6 descending

draw STATE
]




TheRumpledOne
6,409 posts
msg #160211
Ignore TheRumpledOne
modified
3/28/2023 4:15:37 PM

Fetcher[

/* PRICE ACTION STATE CHANGE - OUTSIDE BAR FOLLOWED BY INSIDE BAR */
/* Copyright 2023 by Avery T. Horton, Jr. aka The Rumpled One */
/* Permission to use PRICE ACTION STATE CHANGE within StockFetcher Granted */
/* Permission to publish or post on any other forum DENIED */
/* ----------------------------------------------------------------*/


/* CALCULATIONS */
set{CCb,days(close is above close 1 day ago,100)}
set{CCa,days(close is below close 1 day ago,100)}
set{ClxCl, CCa - CCb}

set{E5b,days(close is above ema(5),100)}
set{E5a,days(close is below ema(5),100)}
set{CxEma5, E5a - E5b}

/* CALCULATIONS */

set{xHH,count(high is above high 1 day ago,1)}
set{xLL,count(low is below low 1 day ago,1)}

set{xHH1,count(high 1 day ago is above high 2 days ago,1)}
set{xLL1,count(low 1 day ago is below low 2 days ago,1)}

set{xLH,count(high is below high 1 day ago,1)}
set{xHL,count(low is above low 1 day ago,1)}

set{xLH1,count(high 1 day ago is below high 2 day ago,1)}
set{xHL1,count(low 1 day ago is above low 2 day ago,1)}

set{HH, xHH * xHL }
set{LL, xLL * xLH }
set{IB, xLH * xHL }
set{OB, xHH * xLL }

set{HH1, xHH1 * xHL1 }
set{LL1, xLL1 * xLH1 }
set{IB1, xLH1 * xHL1 }
set{OB1, xHH1 * xLL1 }

set{HHHLdays,days(HH is below 1 1 day ago,100)}
set{LHLLdays,days(LL is below 1 1 day ago,100)}
set{IBdays,days(IB is below 1 1 day ago,100)}
set{OBdays,days(OB equals 1 1 day ago ,100)}

Set{p1, OB * 1}
Set{p2, IB * 10}
Set{p3, LL * 100}
Set{p4, HH * 1000}

Set{pa, p1 + p2}
Set{pb, p3 + p4}
Set{STATE0, pa + pb}


Set{p1x, OB1* 1}
Set{p2x, IB1 * 10}
Set{p3x, LL1 * 100}
Set{p4x, HH1 * 1000}

Set{pax, p1x + p2x}
Set{pbx, p3x + p4x}
Set{STATE1, pax + pbx}

Set{STATE , STATE0 - STATE1}

and add column separator
and add column IBdays
and add column HHHLdays
and add column LHLLdays
and add column OBdays
and add column separator

and add column STATE0

and add column clxcl
and add column CxEma5



add column industry

/* SELECTION CRITERIA */

price above 5
volume above 1000000

sort column 6 descending

draw IBdays
]



TheRumpledOne
6,409 posts
msg #160213
Ignore TheRumpledOne
modified
3/28/2023 5:01:47 PM

Fetcher[

/* TRO MTC CHECKER - IB */

set{ hiop, high - open }
set{ up10, count( hiop > 0.09, 100 ) }
set{ up50, count( hiop > 0.49, 100 ) }
set{ pct1, up50 / up10 }
set{winpct, 100 * pct1 }


/* CALCULATIONS */

set{xHH,count(high is above high 1 day ago,1)}
set{xLL,count(low is below low 1 day ago,1)}

set{xHH1,count(high 1 day ago is above high 2 days ago,1)}
set{xLL1,count(low 1 day ago is below low 2 days ago,1)}

set{xLH,count(high is below high 1 day ago,1)}
set{xHL,count(low is above low 1 day ago,1)}

set{xLH1,count(high 1 day ago is below high 2 day ago,1)}
set{xHL1,count(low 1 day ago is above low 2 day ago,1)}

set{HH, xHH * xHL }
set{LL, xLL * xLH }
set{IB, xLH * xHL }
set{OB, xHH * xLL }

set{HH1, xHH1 * xHL1 }
set{LL1, xLL1 * xLH1 }
set{IB1, xLH1 * xHL1 }
set{OB1, xHH1 * xLL1 }

set{HHHLdays,days(HH equals 1 1 day ago ,100)}
set{LHLLdays,days(LL equals 1 1 day ago ,100)}
set{IBdays,days(IB equals 1 1 day ago ,100)}
set{OBdays,days(OB equals 1 1 day ago ,100)}

Set{p1, OB * 1}
Set{p2, IB * 10}
Set{p3, LL * 100}
Set{p4, HH * 1000}

Set{pa, p1 + p2}
Set{pb, p3 + p4}
Set{STATE0, pa + pb}


Set{p1x, OB1* 1}
Set{p2x, IB1 * 10}
Set{p3x, LL1 * 100}
Set{p4x, HH1 * 1000}

Set{pax, p1x + p2x}
Set{pbx, p3x + p4x}
Set{STATE1, pax + pbx}



Set{STATE , STATE0 - STATE1}

and add column separator
and add column HHHLdays
and add column LHLLdays
and add column IBdays
and add column OBdays

and add column separator

add column up10
add column up50
add column winpct


up50 above 79

IB equal 1
price above 10
average volume(90) above 1000000


sort column 7 descending
]



TheRumpledOne
6,409 posts
msg #160215
Ignore TheRumpledOne
modified
3/28/2023 5:15:10 PM

Fetcher[

/* TRO MTC CHECKER - WITH STATE DISPLAY */

set{ hiop, high - open }
set{ up10, count( hiop > 0.09, 100 ) }
set{ up50, count( hiop > 0.49, 100 ) }
set{ pct1, up50 / up10 }
set{winpct, 100 * pct1 }


/* CALCULATIONS */

set{xHH,count(high is above high 1 day ago,1)}
set{xLL,count(low is below low 1 day ago,1)}

set{xHH1,count(high 1 day ago is above high 2 days ago,1)}
set{xLL1,count(low 1 day ago is below low 2 days ago,1)}

set{xLH,count(high is below high 1 day ago,1)}
set{xHL,count(low is above low 1 day ago,1)}

set{xLH1,count(high 1 day ago is below high 2 day ago,1)}
set{xHL1,count(low 1 day ago is above low 2 day ago,1)}

set{HH, xHH * xHL }
set{LL, xLL * xLH }
set{IB, xLH * xHL }
set{OB, xHH * xLL }

set{HH1, xHH1 * xHL1 }
set{LL1, xLL1 * xLH1 }
set{IB1, xLH1 * xHL1 }
set{OB1, xHH1 * xLL1 }


set{HHHLdays,days(HH equals 1 1 day ago ,100)}
set{LHLLdays,days(LL equals 1 1 day ago ,100)}
set{IBdays,days(IB equals 1 1 day ago ,100)}
set{OBdays,days(OB equals 1 1 day ago ,100)}

Set{p1, OB * 1}
Set{p2, IB * 10}
Set{p3, LL * 100}
Set{p4, HH * 1000}

Set{pa, p1 + p2}
Set{pb, p3 + p4}
Set{STATE0, pa + pb}


Set{p1x, OB1* 1}
Set{p2x, IB1 * 10}
Set{p3x, LL1 * 100}
Set{p4x, HH1 * 1000}

Set{pax, p1x + p2x}
Set{pbx, p3x + p4x}
Set{STATE1, pax + pbx}



Set{STATE , STATE0 - STATE1}

and add column separator
and add column STATE
and add column HHHLdays
and add column LHLLdays
and add column IBdays
and add column OBdays
and add column separator

add column up10
add column up50
add column winpct


up50 above 79

price above 10
average volume(90) above 1000000


sort column 11 descending
]



TheRumpledOne
6,409 posts
msg #160216
Ignore TheRumpledOne
modified
3/28/2023 5:19:42 PM

Fetcher[
/* PRICE ACTION STATE DISPLAY - DAYS SINCE EACH STATE */

/* CALCULATIONS */

set{xHH,count(high is above high 1 day ago,1)}
set{xLL,count(low is below low 1 day ago,1)}

set{xHH1,count(high 1 day ago is above high 2 days ago,1)}
set{xLL1,count(low 1 day ago is below low 2 days ago,1)}

set{xLH,count(high is below high 1 day ago,1)}
set{xHL,count(low is above low 1 day ago,1)}

set{xLH1,count(high 1 day ago is below high 2 day ago,1)}
set{xHL1,count(low 1 day ago is above low 2 day ago,1)}

set{HH, xHH * xHL }
set{LL, xLL * xLH }
set{IB, xLH * xHL }
set{OB, xHH * xLL }

set{HHHLdays,days(HH equals 1 1 day ago ,100)}
set{LHLLdays,days(LL equals 1 1 day ago ,100)}
set{IBdays,days(IB equals 1 1 day ago ,100)}
set{OBdays,days(OB equals 1 1 day ago ,100)}

/* DISPLAY */

and add column separator
and add column HHHLdays
and add column LHLLdays
and add column IBdays
and add column OBdays

and add column separator

sort column 6 descending

/* SELECTION */

price above 10
average volume(90) above 1000000

]



StockFetcher Forums · General Discussion · PRICE ACTION STATE CHANGE<< 1 2 3 >>Post Follow-up

*** Disclaimer *** StockFetcher.com does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. StockFetcher.com does not recommend particular securities. StockFetcher.com, Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.


Copyright 2022 - Vestyl Software L.L.C.Terms of Service | License | Questions or comments? Contact Us
EOD Data sources: DDFPlus & CSI Data Quotes delayed during active market hours. Delay times are at least 15 mins for NASDAQ, 20 mins for NYSE and Amex. Delayed intraday data provided by DDFPlus


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.