is this code working for you, I mean did you test it?
Your code seems correct but, I did not get it to work sofar.
I tested it to plot the “shapeUpArrow” which has number 1. So in the truepart array I put the value 1 where I want to draw a “shapeUpArrow”
First I thought there might be a problem with my BuyArray and therefor in the code below I also added PlotTextSetFont (for testing purposes) and that works. So the truepart array is filled. For the rest it seems ok, but it does not show the “shapeUpArrow”. Do you see an error somewhere?
Yes, I have tested it. If I post untested code parts then usually I add comment “untested”.
I have not looked for further bugs in your code…
BUT (one) potential reason yours is not working is that your indexing of your IIf function is wrong.
BTW, your PlotShapes snippet of post#1 would work too since PlotShapes accepts array/float argument types. So no loop required (but via array types and applying looping it works too).
You will see shapes at each new day start in color red and offset -15. No error messages.
So the sole reason of it not working originally was your wrong indexing of IIf function argument types. It is already wrong in first post of this thread but I haven’t recognized it the first time.
damn, you are right! All these problems because of a typo. Then from your initial example I understood that all the arguments should be of the same type, which made sense. But now it turns out that this is not necessary
I was initially just translating plotshapes I use in my AFL but now I just removed the iif all together and use code below. But indeed it becomes time that I streamline this translating stuff a little so that I do not run in these typo problems. There are pieces of code I use over and over again, doing a lot of copying and pasting and sometimes I then make an error changing indexes etc.
better someone else answer that question. I am not active at the moment with Amibroker and I just bought new computer so I do not have Visual Studio installed yet
Greetings! Can you please guide me on how can I access the Buy array?
I would like to access the Buy Array and then put final buying condition (True / False OR 1 / 0).
Thank you!
Dear @fxshrat
On the basis of hint given by you, I have also used PlotOHLC which has 12 parameters and
it has also plotted cloud very nicely with conditional colors of bullish and bearish trend .
But what is to be done with optional parameters of PlotOHLC?, because mostly first 7 parameters are widely used and next 5 are not used much.
Do we need to run loop from 0 to 11 for Arguments Array and then to confirm each of them with EMPTY_VAR to check if optional parameters are used or not?