Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Higher Low within a certain amount of bars Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
Jester73
Posted : Sunday, January 3, 2016 8:17:32 PM
Registered User
Joined: 6/28/2007
Posts: 18

Hi Bruce,

 

hope you can help. I am looking for 2 scans

1. I would need a scan that can detect a sequence of at least 2 subsequent higher lows within a defined number of bars say 5. I also would need the same in reverse 2 subsequent lower highs within a defined number of bars again 5.

One more thing while I am at it. I have intraday data and use the screening option regularily. In the scan conditions it differs between crossing and above. Can you tell me the difference? Does above (for instance 20 EMA)  mean that price has to close with the current bar above 20 EMA before the screener gives a signal and crossing means simply 1 tick above while price is not yet closed? 

Thanks 

Marco

Jester73
Posted : Monday, January 4, 2016 9:47:16 PM
Registered User
Joined: 6/28/2007
Posts: 18

Hi Bruce,

 

did you forget me? : - )


Cheers Marco

Bruce_L
Posted : Tuesday, January 5, 2016 12:52:46 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

I didn't actually forget you. I was sick yesterday and did my best to answer any questions I could, but didn't answer them all. In your case the reason was I didn't think I understood the question and thought it might be because being sick was affecting my thinking.

In looking at the question again today, I don't think so. I can think of a bunch of possible interpretations. I don't even want to guess at this point. I will need some additional clarification as to the intent of the question.

Crossing up is checking for something to be above currently but below during the previous bar. Being above just just for being above currently and does not make any checks as to when it might have been below.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Jester73
Posted : Wednesday, January 6, 2016 1:33:50 PM
Registered User
Joined: 6/28/2007
Posts: 18

Hi Bruce,

no problem I understand. In the past you were so quick with your replies that I thought that there must have been a technical issue. 

Anway let me clarify to you what I need because now reading it again I realised I was not clear and missed something out. Basically it is a pullback scan. 

Lets say we have an upmove. In this upmove price should retrace by a certain amount of bars (minimum 2) however it can be more as well.. In this example lets use 4 bars retrace. The last 2 bars (bar 3 and 4) of this 4 bar pullback should make at least 2 subsequent lower highs and lower lows to get an orderly pullback.  What bar 1 and 2 make in this example is irrelevant.  I want to avoid scan results that mostly come from news events where one has one big candle with big tails. 

I would need to have the same for a down move (basically the whole scenario inverted) .

I would like to be able to test the settings a bit (so for instance 3 bar lower lows, higher lows)thuyso it would be great if you could tell me what I would need to change so that I do not have to bother you again.

I hope this clarifies it for you. Thank you so much in advance and great to see that you are doing better again,

All the best

Marco

Bruce_L
Posted : Wednesday, January 6, 2016 1:51:27 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

Two lower highs and lower lows in a row could be written as follows.

H < H1 AND L < L1 AND H1 < H2 AND L1 < L2

Two higher highs and higher lows in a row could be written as follows.

H > H1 AND L > L1 AND H1 > H2 AND L1 > L2

The pattern is fairly simple to add more bars. Three up bars in a row would just add checks that increment the bars ago parameters by 1 for the next two bars.

H > H1 AND L > L1 AND H1 > H2 AND L1 > L2 AND H2 > H3 AND L2 > L3

Checking for two lower highs and lower lows to have happened at least once in the most recent 5 bars is a bit more complicated. Traditionally you would need to check for each possible instance where this could have happened.

(H < H1 AND L < L1 AND H1 < H2 AND L1 < L2) OR (H1 < H2 AND L1 < L2 AND H2 < H3 AND L2 < L3) OR (H2 < H3 AND L2 < L3 AND H3 < H4 AND L3 < L4) OR (H3 < H4 AND L3 < L4 AND H4 < H5 AND L4 < L5) OR (H4 < H5 AND L4 < L5 AND H5 < H6 AND L5 < L6)

But there is a better way to do this. We could use one of the first two formulas (depending on which direction you want) as the Boolean Formula in the Custom PCF % True Indicator used in the following technique.

Condition True at Least Once Over x Bars

Then you could just change the period of the Custom PCF % True Indicator to change the number of bars over which you are checking for the two higher or two lower bars in a row.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Jester73
Posted : Friday, January 8, 2016 8:18:39 PM
Registered User
Joined: 6/28/2007
Posts: 18

Hi Bruce,

 

One Word: AMAZING !!!!!  Thank you so much. Exactly what I needed! : - )

 

All the best and again thanks for your help and support

Marco

Bruce_L
Posted : Monday, January 11, 2016 10:43:33 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

You're welcome.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.