Bull Flag and Bear Flag Formations for ThinkorSwim

B

Buckbull

Member
ahh ok thast how you do it , I got it thanks for all your help @BenTen !!! Thanks for all you do on this site !
 
T

tomsk

Well-known member
VIP
@Buckbull Possible to post the code here in this study? I avoid Watchlist links as it is not possible to DELETE any such watchlists once it has been imported
 
BenTen

BenTen

Administrative
Staff
VIP
@tomsk I added the new code in the original thread.
 
T

tomsk

Well-known member
VIP
@BenTen Which post # is that ? #1 or #2 ? If so I'm good else please advise
 
T

tomsk

Well-known member
VIP
@BenTen I looked at Ken Rose's code, it seems that his definition of a bull flag has no mention of a typical flag pole vide the following snippet extracted from his code

def trend = simpleMovingAvg("length"=30) > (simpleMovingAvg("length"=30)[5]);
def MacdLow = macdHistogram(8,17,9)[1] < macdHistogram(8,17,9)[2]
and close[1] < close[2]
and close > high[1];
def Bulltrigger = trend and MacdLow;

I reviewed Mobius implementation of a bull flag scan - he uses a fractal energy computation as part of the equation amongst other things.
 
BenTen

BenTen

Administrative
Staff
VIP
@tomsk Yup, this flag formation by Ken Rose is different from what you would look for in a typical flag pattern. Not sure why he called it that.
 
B

Buckbull

Member
@tomsk Do you have the Mobius script I would like to check it out .
 
T

tomsk

Well-known member
VIP
@Buckbull per your request here is Mobius Bull Flag scan

# Bull Flag on Pole - SCAN
# Mobius
# V01.02.2014

# Price trend - Upward leading to the pattern.
# Shape - A consolidation pattern forms.
# Volume - Recedes for best performance
# Confirmation - The pattern confirms as valid when price closes above the highest peak in the pattern.

input n = 21;

def upward = IsAscending(HL2, 65);
def p = (highest(high, 21) / close[65]) > 1.1;
def h = high;
def l = low;
def c = close;
def FE = (Log(Sum(TrueRange(h, c, l), n) /
(Highest(h, n) - Lowest(l, n))) /
Log(n)) > .68;
def LowVol = volume < Average(volume, 50);

plot Flag = upward and p and FE and LowVol;
 
vvcv

vvcv

Member
uff, thanks for this. Glad I found this and the site. Just giddy to try it. Looks great at pointing out pullbacks, which is where i enter (the market that is) :devilish:
 
B

Buckbull

Member
Have you guys compared the two to see what one is more accurate ?
 
G

ganq

New member
2019 Donor
I put it in a watch list https://tos.mx/Nn4Oje1 criteria $20.00 stock with a volume at or above 250,000. then I add the Bullflag Bearflag into my watchlist . I just go through the watchlist seeing where the MA's are and where the candle is in relation to the BB whether they are pointed up, down or flat . Thats what dictates if I get into trade or not
Hi @Buckbull , which BB length and standard deviation have you found to be most useful on the daily chart? - and do you play weeklies or month or so out for Options expiry?

Thanks!
 
T

tomsk

Well-known member
VIP
Have you guys compared the two to see what one is more accurate ?
@Buckbull A bull flag is usually described with the notion of a flag pole. Mobius incorporates that in his code while in Ken Rose's study he does not.
 
G

ganq

New member
2019 Donor
@Buckbull A bull flag is usually described with the notion of a flag pole. Mobius incorporates that in his code while in Ken Rose's study he does not.
I have heard references about Mobius on this site so many times, who is he/she?
 
T

tomsk

Well-known member
VIP
@ganq he is a very talented and well versed in thinkscript, written thousands of wonderful studies, a professor, mathematician, programmer at large. Many of studies here like Opening Range Breakout, RSI Laguerre and others were written by him.
 
B

Buckbull

Member
@Buckbull A bull flag is usually described with the notion of a flag pole. Mobius incorporates that in his code while in Ken Rose's study he does not.
Kens Alerts you after it breaks out of the Flag
 

Similar threads

Top