| Coding Forum Collaborate, receive help, or discuss coding related issues. |
![]() | | Tweet | |
| | #1 | ||
![]() | Quote Tracker Value Chart Paintbar I've been trying to develop a code to have a value chart as a paint bar on Quote Tracker, but have been having trouble with making the code work. Here's what I have so far: if (Bar High-SMA)/0.3>8 set color to Red if (Bar High-SMA)/0.3>=4 AND (Bar High-SMA)/0.3<=8 set color to $B7B7F (Light Red) if (Bar Low-SMA)/0.3<=-4 AND (Bar Low-SMA)/0.3>=-8 set color to $B7FFB7 (Light Green) if (Bar Low-SMA)/0.3<-8 set color to Green For example, the top line if (Bar High-SMA)/0.3>8 set color to Red, is the bar high minus the SMA (5 Day (H+L)/2), that part works fine. The part I'm having trouble with is the 0.3 part. It is suppose to be what is called a volatility unit, which is figured by (((Bar High[4]-Bar Low[4])+(Bar High[3]-Bar Low[3])+(Bar High[2]-Bar Low[2])+(Bar High[1]-Bar Low[1])+(Bar High-Bar Low))/5)*0.20. I just put 0.3 in for now because that was some average I figured out. The 0.20 makes it adjust to changing volatility overtime. I try putting it all together and nothing shows up. I want to know when the highs or lows get to the overbought or oversold area, and shade them the appropriate color. This is what it is suppose to be for signif. overbought: (Bar High-SMA)/(((Bar High[4]-Bar Low[4])+(Bar High[3]-Bar Low[3])+(Bar High[2]-Bar Low[2])+(Bar High[1]-Bar Low[1])+(Bar High-Bar Low))/5)*0.20 > 8 It needs to be greater than +8. Does anyone see what I'm doing wrong, or is it even possible to figure it out. Any help would be appreciated. | ||
| |
|
| | #2 | ||
![]() | Re: Quote Tracker Value Chart Paintbar Quote:
When in doubt, always put in the parenthesis: if ((Bar High-SMA)/0.3)>8 set color to Red Also is there an input value for SMA ? Last edited by OAC; 01-06-2009 at 04:09 PM. | ||
| |
|
| | #3 | ||
![]() | Re: Quote Tracker Value Chart Paintbar if (Bar High-SMA(5)) / (((Bar High[4]-Bar Low[4]) + (Bar High[3]-Bar Low[3]) + (Bar High[2]-Bar Low[2]) + (Bar High[1]-Bar Low[1]) + (Bar High-Bar Low))/5)*0.2 >8 set color to Red It still shows nothing on the chart. It might be to complex or the expression is incorrect, anyone else have any thoughts? | ||
| |
|
| | #4 | ||
![]() | Re: Quote Tracker Value Chart Paintbar I am going to compare to the NinjaTrader version and see how it goes. | ||
| |
|
| | #5 | ||
![]() | Re: Quote Tracker Value Chart Paintbar | ||
| |
|
| | #6 | ||
![]() | Re: Quote Tracker Value Chart Paintbar Quote:
When in doubt, always put in the parenthesis: | ||
| |
|
| | #7 | ||
![]() | Re: Quote Tracker Value Chart Paintbar Thanks for your help. | ||
| |
|
| | #8 | ||
![]() | Re: Quote Tracker Value Chart Paintbar Happy New Year | ||
| |
|
![]() |
| Thread Tools | |
| Display Modes | Help Others By Rating This Thread |
| |
| ∧ Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help with Creating a 9/30 Crossover Paintbar Indicator | Disco Scottie | Coding Forum | 3 | 12-13-2010 04:38 AM |
| Trend Indicator Paintbar | Squire69 | Coding Forum | 12 | 08-15-2010 05:11 PM |
| Convert CCI Code into a Paintbar TS2000i | mrb123 | Coding Forum | 0 | 10-10-2008 12:01 PM |
| Up and DownTicks PaintBar | jojojo | Coding Forum | 0 | 11-15-2007 04:05 AM |
| Simple Paintbar Request | MrPaul | Coding Forum | 4 | 06-20-2007 08:10 PM |