Need more than 8 buffers in my Custom Indicator!!! How can I get this done? - page 2

 
Tenners:

Hi fbj,

sorry about that...but I still do have the unchanged original code....see here:



The first problem here is I don't really follow the line I marked with "???????" marks...
Not really clear how the ExtMapBuffer5 and ExtMapBuffer6 can be used to calculate haOpen when they haven't even been set at yet.
All declarations have an initial value on program startup. On these buffers, the elements will be zero - the value given to all uninitialised declartions. iow, the default value is zero.
Regards the ??? line, not known, the code works so I just 'live with it' :)

Secondly....as you see from the original code....if I want to use 2 new buffers arrowUp and arrowDn to "draw" arrows on the chart...they will have to be in the buffer index range from 0 - 7.....this means I would have to use the method you described to create at least 2 of the ExtMapBuffers that are only used for calculation...namely.....ExtMapBuffer 5,6,7 and 8
Your orig mods had some issues.
//#property indicator_buffers 4
#property indicator_buffers 6 //"+2" bcus added up,dn arrow buffers

maybe best you look at the attachment. is rough, but have put in comments - hope helps. also see pic of quick run of orig HA smoothed + the moded code.
NOTE: +/- 10 pips needs further considerations...

Am I right?
see attached file. remember that by adding TWO of your own buffers that must be indicator buffers (plotted), that only TWO of the calculation buffers must be removed from the buffers list and given
the resize + set as series treatment. And that is all you need do - witness the attached file and pic below.



 
Tenners:
I mean....wouldn't I have to do this even if I wanted to use iCustom in another indicator to get the values of the arrow buffers???


never had reason to us iCustom() in another indicator.

Given that the supplied modded indy seems to get plotted arrows on it. I guess you'll have to play with doing iCustom() call - just make sure to use:

//arrowUp[] aka:index buffer 4 --> iCustom(...,4,shift)
//arrowDn[] aka:index buffer 5 --> iCustom(...,5,shift)

and remembering that non-zero value [shift] value is something plotted and a zero value [shift] is a not plotted element...

not see that anything else I can contribute so play around and take it one step at a time cuz introducing many new ideas can be misleading as to just what works and not works...

i'm off to dream land now... as many hrs ahead on fri of coding to do, then sat,sun,mon... - is hammer and chisel for me. just keep plodding along until 'get it right' :-)

have fun

 
fbj:

never had reason to us iCustom() in another indicator.

Given that the supplied modded indy seems to get plotted arrows on it. I guess you'll have to play with doing iCustom() call - just make sure to use:

//arrowUp[] aka:index buffer 4 --> iCustom(...,4,shift)
//arrowDn[] aka:index buffer 5 --> iCustom(...,5,shift)

and remembering that non-zero value [shift] value is something plotted and a zero value [shift] is a not plotted element...

not see that anything else I can contribute so play around and take it one step at a time cuz introducing many new ideas can be misleading as to just what works and not works...

i'm off to dream land now... as many hrs ahead on fri of coding to do, then sat,sun,mon... - is hammer and chisel for me. just keep plodding along until 'get it right' :-)

have fun


Thanks again for lending your expertise fbj!!!!

After reviewing your mods I realized that I was pretty careless in many areas of my code. :( I made quite a few simple mistakes :(
I understand all your points but I don't get why (if I put 2 more buffers in the "plotted buffer" section)...and I put the 4 buffers used for calculation in the start() as you described....and everything else is the same as your modified version.....I get the arrows....but the heiken ashi bars are still messed up....I will continue to play with it to see if I can figure it out but you have been VERY helpful. I appreciate that.

Have a good sleep!!
Thanks....T
 
Tenners:

Thanks again for lending your expertise fbj!!!!

After reviewing your mods I realized that I was pretty careless in many areas of my code. :( I made quite a few simple mistakes :(
I understand all your points but I don't get why (if I put 2 more buffers in the "plotted buffer" section)...and I put the 4 buffers used for calculation in the start() as you described....and everything else is the same as your modified version.....I get the arrows....but the heiken ashi bars are still messed up....I will continue to play with it to see if I can figure it out but you have been VERY helpful. I appreciate that.

Have a good sleep!!
Thanks....T


ok, thanx. look at attachment - is your original modded HA code. I have annotated the HA code for you with my observations (imho...)

The second section of the attachment NOT looked at yet. However why do you not understand the first section and then with this knowledge, re-visit the second section/calling indicator.

Again, you would be well advised to get the modded HA code working firstly since this is code you 'expect' to return some reasonable datums via iCustom() call, ok?

The original quick mods I made can be your ref. point maybe in this exercise, yes?

 
fbj:

ok, thanx. look at attachment - is your original modded HA code. I have annotated the HA code for you with my observations (imho...)

The second section of the attachment NOT looked at yet. However why do you not understand the first section and then with this knowledge, re-visit the second section/calling indicator.

Again, you would be well advised to get the modded HA code working firstly since this is code you 'expect' to return some reasonable datums via iCustom() call, ok?

The original quick mods I made can be your ref. point maybe in this exercise, yes?


Again,

makes good sense. I will continue to try getting my original modded code to do what it's "supposed" to do using your mods as a guideline.
I will keep you posted on my progress.


thanks for everything so far fbj.