| StefanB |
|
Gold User, Member, TeleChart
|
| Registered User |
|
|
|
|
| Unsure |
|
| Friday, January 22, 2010 |
| Saturday, February 18, 2012 10:27:36 AM |
7 [0.00% of all post / 0.00 posts per day] |
|
After further investigation I find that if I create a new chart and plot median price from the indicator and plot it from an import there are no problems. The discrepancies only exist when I edit another of my saved indicators AO:
'|*** Indicator:AO
'|******************************************************************
'# med = indicator.MyLibrary.MedianPrice
'# AO = indicator.Library.Awesome Oscillator
'plot = -(AO.Value)
plot = med.Value
to plot the median price. I don't know whether there is a caching issue here or some other problem but since I only did this originally to check another problem with my indicator I will not worry too much about this. If I want to check something I will create a new test indicator rather than trying to modify an existing one.
|
Not sure how much more info you want, I thought my query was fairly clear.
An indicator stored in my library called MedianPrice:
'|*** Indicator:MedianPrice
'|******************************************************************
Dim MP As Single
MP = (price.High + price.Low) / 2
plot = MP
A cut-down indicator I was working on called AO:
'|*** Indicator:AO
'|******************************************************************
'# med = indicator.MyLibrary.MedianPrice
plot = med.Value
Specific stocks - just because I have nothing else to do at the moment looked at all Dow Jones Industrials and all showed discrepancies. Date/Time of failure - any date/time I look at, as I originally stated the discrepancies are sometimes small and sometimes large but these two pieces of code are plotting different values.
|
I have a median price, (H+L)/2, indicator stored in my library. I imported this into another indicator for use in creating an oscillator and noticed this was different to my indicator coded in another package. Investigation showed that the imported median price must have different values. To cut a long story short the following
'# med = indicator.MyLibrary.MedianPrice
plot = med.Close
produces different values to my imported indicator when charted in the same layout. Differences are not consistent and vary from as small as .05 to 2.0+. I must be doing something wrong but I cannot see where my mistake is.
|
|
Thanks a lot, the second version worked perfectly.
|
I am trying to replicate the Heiken-Ashi system I coded for another charting package. I have the candles working fine but I am having problems coding the paint rules. In an example I found on the forum the up rule is If Line.Value > Line.Value(1) Then PlotColor = Color.Green..... What I want to do is the following; If Ha.Close > Ha.Open Then PlotColor = Color.Green.
I have dragged the Heiken-Ashi indicator to my rule code and am referencing it as above but I just get the default yellow bars from the final else clause. Is it possible to reference the Heiken-Ashi component prices from the paint rules?
|
|