acfncp3 59 posts msg #71526 - Ignore acfncp3 |
2/19/2009 7:40:15 AM
Yesterday I listened to a person from wallstreetteachers.com. They use a bollinger with the setting of displacement: 10 upperband .8 and lower band - .8 . I tried to find where I could change the BB settings in SF but couldn't find where to change the default of 20. They use this with the CCI moving average 50 crossing either the -100 or +100.
How would you code this in SF.
Thanks in advance.
|
chetron 2,817 posts msg #71528 - Ignore chetron modified |
2/19/2009 9:20:20 AM
how about....
or was it.....
|
BuylateSellearly 29 posts msg #71557 - Ignore BuylateSellearly |
2/19/2009 6:17:14 PM
I heard that same chat discussion on the TOS platform. THat was a very information chat. The guts of the system use a slingshot effect of the 3 different CCI's. When the 20 and 50 are pegged above/below the 100 line AND the 5 retraces by more that 150 pts momentarily in the opposite direction, price will snap back. Place trade. Would be nice to be able to search for those conditions using SF. RIG is in that condition now. Here's the TOS code:
declare lower;
input length05 = 5;
input length20 = 20;
input length50 = 50;
input over_sold = -100;
input over_bought = 100;
def price = (high + low + close);
def linDev05 = lindev(price, length05);
def linDev20 = lindev(price, length20);
def linDev50 = lindev(price, length50);
plot CCI05 = if linDev05 == 0 then 0 else (price - Average(price, length05)) / linDev05 / 0.015;
plot CCI20 = if linDev20 == 0 then 0 else (price - Average(price, length20)) / linDev20 / 0.015;
plot CCI50 = if linDev50 == 0 then 0 else (price - Average(price, length50)) / linDev50 / 0.015;
plot OverBought = over_bought;
plot ZeroLine = 0;
plot OverSold = over_sold;
CCI05.SetDefaultColor(Color.MAGENTA);
CCI20.SetDefaultColor(Color.YELLOW);
CCI50.SetDefaultColor(Color.CYAN);
Overbought.SetDefaultColor(GetColor(5));
ZeroLine.SetDefaultColor(GetColor(5));
Oversold.SetDefaultColor(GetColor(5));
|
chetron 2,817 posts msg #71561 - Ignore chetron modified |
2/19/2009 8:05:38 PM
DOES THIS DO IT???????????????
|
BuylateSellearly 29 posts msg #71617 - Ignore BuylateSellearly |
2/20/2009 1:47:44 PM
Good job chetron. Here is a link to the entire chat session that David Elliot gave which describes various setups and time frames that these setups occur.
http://cid-b944148c0d14c501.skydrive.live.com/browse.aspx/TOS%20Wed%20online%20class%20files/2-18-09%20David%20Elliott
|
acfncp3 59 posts msg #71635 - Ignore acfncp3 |
2/21/2009 1:02:30 PM
Wow, that's great ... when I "backtest" looking at the results from date offset this looks like a great way to buy puts if the CCI(5) makes a point. If the CCI(5) continues up then it looks like a short pullback and a chance to go long again. Chetron would you please code it for the call side as well.
If you listen to the web chat, one thing that David talked about was using the moving average Bollinger Band of 10, .8 -.8. He would look for a break out above that BB with anything within those standard deviations as being defined as noise. Would you be able to incorporate the BB(10,.8) as well.
Thanks again in advance.
|
chetron 2,817 posts msg #71636 - Ignore chetron modified |
2/21/2009 1:32:05 PM
with some bb.8 stuff......
and the reverse....
|
BuylateSellearly 29 posts msg #71655 - Ignore BuylateSellearly |
2/22/2009 11:32:26 PM
Hi Chetron,
Nice work on this CCI stuff. Can you explain to me what these lines of code do and why you added them?
set{vcci51,cci(5) 1 day ago}
set{vtrigger,cci(5) - vcci51}
set{vsuper,abs(vtrigger)}
Also the mobo breakout is when all three CCI's breakout above 100 not 50... unless you handled that with the code above?
open above Upper Bollinger Band(10,.8)
cci(50) above 50 <---------should be 100
cci(20) above 50 <-------- should be 100
vsuper above 100
Here is a better link to the Dave Elliot webinar and Chat which shows how to use the CCI mobo breakout and the SBD and SBU (snap back down and snap back up) patterns.
http://mediaserver.thinkorswim.com/demos/2008/TOSDemoPlayer.html?vidSource=/transcripts/2008/20090218.swf
|
chetron 2,817 posts msg #71659 - Ignore chetron modified |
2/23/2009 6:32:38 AM
Also the mobo breakout is when all three CCI's breakout above 100 not 50... unless you handled that with the code above?
open above Upper Bollinger Band(10,.8)
cci(50) above 50 <---------should be 100
cci(20) above 50 <-------- should be 100
vsuper above 100
******************************************************
when you put in 100, SF cuts out some of the qualifing instruments. why? i don't know, but i am using RIG, on 2/19/09, as my test and this code caught it.
|
chetron 2,817 posts msg #71660 - Ignore chetron modified |
2/23/2009 6:42:00 AM
Nice work on this CCI stuff. Can you explain to me what these lines of code do and why you added them?
set{vcci51,cci(5) 1 day ago}
set{vtrigger,cci(5) - vcci51}
set{vsuper,abs(vtrigger)}
**********************************
as for the 1st line:
i have noticed on SF, that when you use "day ago" inside of a custom variable with math, that some results get left behind, and when you make it, it's own custom variable 1st, then all is well, so now it's my standard.
lines 2 and 3 :
just do the math to give me the difference of cci(5) yesterday v. todayish to find the 100 point move. abs = absolute value .
|