OmniTrader Forum - OmniTrader 2018 Technical Support
This is not working ?

^ Top
Gerry

Posts: 277

Joined: 12/24/2003
Location: Lewiston, Maine 04240

User Profile
 
Subject : This is not working ?
Posted : 8/2/2018 6:42 AM
Post #45119

Hello,

I’m having a brain freeze moment and would appreciate some assistance in the following. I’m looking for stocks that have closed HIGHER for the past 3 bars and then on the 4th bar is LOWER than the prior bar.

This is what I am now using to get the above mentioned BUT cannot seem to know where to place the C < C[1]. Here it is C > C[1] and C[1] > C[2] and C[2] > C[3] This gives me the 3 HIGHER CLOSES.

Also trying C < C[1] and C[2] > C[3] and C[3] > C[4]

Thanking you in advance

Gerry

^ Top
Jim Dean

Posts: 3022

Joined: 9/21/2006
Location: L'ville, GA

User Profile
 
Subject : RE: This is not working ?
Posted : 8/2/2018 7:00 AM
Post #45120 - In reply to #45119

Is the “4th” bar the most recent bar or the oldest bar?
^ Top
Gerry

Posts: 277

Joined: 12/24/2003
Location: Lewiston, Maine 04240

User Profile
 
Subject : RE: This is not working ?
Posted : 8/2/2018 8:16 AM
Post #45122 - In reply to #45119

Hello Jim,

The 4th bar is the oldest

Thanks for your input,
Gerry
^ Top
Jim Dean

Posts: 3022

Joined: 9/21/2006
Location: L'ville, GA

User Profile
 
Subject : RE: This is not working ?
Posted : 8/2/2018 8:40 AM
Post #45123 - In reply to #45122

Here ya go:

C > C[1] and C[1] > C[2] and C[2] > C[3] and C[3] < C[4]

You could use >= and <= if you want - a bit looser but not much.
Or you could make the earliest bar rule more demanding: C[3] < L[4]



https://www.omnitrader.com/currentclients/otforum/thread-view.asp?threadid=15816&posts=4