|
eghunter
 Member
Posts: 7
Joined: 2/6/2008
User Profile |
Could anyone help me write the Omniscript language for the following setups: 1) yesterday's bar (any part) having touched the lower BB; and, 2) the same bar having come within 1% of touching the lower BB. I would very much appreciate any help. Thanks.
|
|
julesrulesny
 Elite
     Posts: 900
Joined: 8/15/2007
Location: NYC
User Profile |
Price touching Lower Bollinger Band - You could change C to H, L, or O
c[1] = BOL_Lower(13,2)
For the rest of it, you are asking for the Omniscript that will show the Bar both touching the Lower BB and also coming within 1% of the Lower BB in the same timeframe? that's going to be difficult.. Your asking OT to look for symbols that both touched the Lower BB and came within 1% of the Lower BB in the same timeframe. Try changing C[1] to C[2].
C[1] means Close 1 day ago, or 1 period ago..
Maybe something like..
c[1] = BOL_Lower(13,2)
AND
C[1] > BOL_Lower(13,2)+.01
Try different figures to see if it meets your standards, or maybe use
C > BOL_Lower(13,2) * ATR(14)*.01
just guess work on my part...
|
|
Jim Dean
 Sage
  Posts: 3022
Joined: 9/21/2006
Location: L'ville, GA
User Profile |
Marc is close but his formulae are missing a [1] on the right side.
Here's what you need, I think ... a scan that identifies stocks that were VERY CLOSE TO the lower BB yesterday. "Very Close" is usually defined as a fraction of ATR (as Marc suggested) ... another way is to make it a percentage of price.
If you're looking for any part of the bar being close to the lower BB yesterday (ie a bit above, a bit below, or exact hit), this should do it for you:
Abs( BOL_Lower(13,2)[1] - L[1] ) < ATR(14)[1] / 20
You can adjust the ATR periods, or the divisor, as you wish. I suggest you try out the scan and check the results on a chart before messing with it.
=== OTOH ===
If you're looking for a stock whose HIGH is close to the lower BB (ie the bar is mostly below the BB):
Abs( BOL_Lower(13,2)[1] - H[1] ) < ATR(14)[1] / 20
=== FINALLY ===
If you're looking for a bar that STRADDLES the lower BB yesterday:
H[1] >= BOL_Lower(13,2)[1] and BOL_Lower(13,2)[1] >= L[1]
[Edited by Jim Dean on 6/30/2011 4:44 PM]
|
|
eghunter
 Member
Posts: 7
Joined: 2/6/2008
User Profile |
I want to thank both of you for taking the time to help me. Your comments were very helpful and much appreciated. Thanks again, eghunter
|
|
julesrulesny
 Elite
     Posts: 900
Joined: 8/15/2007
Location: NYC
User Profile |
You are very welcome. Good luck and hopefully you can get some use out of it.. Let us know your results if or when you get a chance.
Check out these Forum discussions in the VT forum. If you like Bollinger Bands, you may very well like "The Squeeze" which is always a hot discussion topic in the forums:
(**Some are rather old, and perhaps outdated - but maybe you can still get some use out of them..**)
http://www.visualtrader.com/forum/thread-view.asp?threadid=1009
http://www.visualtrader.com/forum/thread-view.asp?threadid=803
http://www.omnitrader.com/omnitrader/proforum/thread-view.asp?threadid=867
http://www.visualtrader.com/forum/thread-view.asp?threadid=1009&posts=20
http://www.omnitrader.com/omnitrader/support/OT2004/forum/thread-view.asp?threadid=4402&start=76&posts=79
http://www.omnitrader.com/omnitrader/proforum/thread-view.asp?threadid=592
http://tradetight.org/forums/thread-view.asp?tid=270&posts=2&highlight=squeeze&highlightmode=1#M853
http://www.omnitrader.com/omnitrader/support/OT2004/forum/thread-view.asp?threadid=3025
Bollinger Band discussion:
http://www.omnitrader.com/omnitrader/proforum/thread-view.asp?threadid=1599
http://www.omnitrader.com/omnitrader/support/OT2004/forum/thread-view.asp?threadid=3128
http://www.omnitrader.com/omnitrader/proforum/thread-view.asp?threadid=787
[Edited by julesrulesny on 7/3/2011 8:44 AM]
|