| dpsimmons2 1 posts
 msg #107032
 - Ignore dpsimmons2
 | 7/13/2012 3:24:07 PM 
 Is there anyone out there who can help me with writing some code?  I'm working on an indicator.. This is what I got so far.
 
 /*FIRST SET THE Cog(5) AS A USER-DEFINED VARIABLE*/
 SET{ Cog5, Cog(5)}
 
 /*NOW GET THE MA(20) OF THIS VARIABLE*/
 SET{cog5MA20, CMA(cog5,20)}
 
 /*NOW CALCULATE THE STDEV TO DETERMINE BOLLINGER BANDS*/
 SET{cog5STD20, CSTDDEV(cog5,20)}
 SET{cog5DIFF, cog5 - cog5AFI(14),20}
 SET{cog5THRESHOLD, cog5STD20 * 2}
 
 SET{cog5UPPERBAND, cog5MA20 + cog5THRESHOLD}
 SET{cog5MEDIANBAND,cog5MA20}
 SET{cog5LOWERBAND, cog5MA20 - cog5THRESHOLD}
 
 DRAW cog5LOWERBAND ON PLOT Cog5
 DRAW cog5MEDIANBAND ON PLOT Cog5
 DRAW cog5UPPERBAND ON PLOT Co
 
 Now what I want to do is Weight down the bollinger bands with another indicator. I'm not sure how do do that. If anyone can help me out I would appreciate it.
 
 
 |