up to now I`ve only found codes that write in the main-chart OR in a seperate and new one. (#property indicator_chart_window)
But it is often useful, to address both or more outputs with only one mathematics. Mainly because of the performance. Else I have to calculate the nearly same thing twice. (simple example: MA in the mainchart and a crossover histogram with the same calculated buffers in a new window)
What is the way to do this ?
Thanks for your help !
It's not possible.
You need more than 1 indicator, or you have to draw line/histogram yourself on the chart/window.
Please don't write ur - it's "you are" or "your"
hmm - I know s.th. and s.o. from English vocable books: do s.th. with s.o.
Oh, this is cruel !
Because ObjectCreate() seems to have a lot of administration and at first a existing subwindow...: Is it possible to load a indicator (the whole procedere including creating its new window) out of an EA or another indicator ? (like 'run' or so ?) I'm looking for a kind of meta-Level to manage and combine (!) stuff like in templates. (But there each replaces the other and will not be able to combine)
Still looking for the best performance, is there a way to get the whole buffer of a included indicator ? E.g. the iMA(...). We can get every single value in a loop. But behind that, it is calculating all the periods again and again. It is faster to pick the existing buffer inside than to ask for each value. Is there a way to point at this memory ?
I'm not really finished with understanding that
MyObject* hobject= new MyObject();
They say it is "Syntactically ... similar to pointers in C++" but "... is not a pointer to the memory". So, what for ? A Pointer is a way to write fast code.
Sorry for my questions and thanks a lot ! MQL4 is new stuff for me and sometimes a little surprising :-)
You can define an OutputBuffer in your Indicator-for-other-Indicators and load its values with iCustom or mt4's technical indicators like ..g. iMA(..) or iCC(..).
But these will 'stay' in the indicator's window as angevoyageur said.
I am English, but I have no idea what s.th or s.o mean.
Imagine what it must be like for people without English as their native language.
Ok, let us see if we are talking the same. I know this iCustom() and others in that way: (symbolic)
for(int pos = maxBars - itsPeriods; pos >= start; pos--)
// in two lines for better understanding
double singleValue = iCustom(Symbol(), PERIOD_D1, "myIndicator", itsPeriods, 0, pos);
m_Buffer[pos] = singleValue;
So it is walking along the data and calculates each value touching each base value itsPeriods-times. (may be 200 or so) But the code inside the indicator is ready shifting the old value and add a new one. Faster !
Or do I missunderstand, is this requested iXY() stacked for the next use without giving me a notice ?
If not, I was looking for a thing like that (NOT WORKING but to me a Request):
double m_Buffer = iCustom(Symbol(), PERIOD_D1, "myIndicator", itsPeriods, 0, ---- );
It`s because I got several times waiting for about 10sec. up to 45sec. to recalculate all the stuff in times of new big data.