Reading indicator buffers set to chart - page 6

 
Andrey Khatimlianskii:

Show me an example where an event-driven model would be needed in conjunction with giving data to an EA.

I have a probability function that shows the level of the most possible price bounce back. The approach I picked up in HFT is that when price has jumped upwards by 10 pips, there is a high probability over the near term that it will bounce back. The further the time, the lower the probability. Well, this is on the fingers to make it clear that the example is more or less real and not from one place.

So, the indicator shows this level. Shows is a visualisation that I can see with my eyes on the chart. I control the parameters of the probability function with graphical objects and with the keyboard. It turns out that besides the fact that the indicator lives from the timer (as I said above, the probability function is strongly time-dependent (minute bars - too crude)) There is also a dependence on the EventChart. It turns out to be a research tool where I can regulate the indicator values with my mouse and keyboard according to my view of the curve and my idea of the current market, the way I see the most correct.

The Expert Advisor should perceive this adjusted indicator as it is on the chart. I know perfectly well that we can write the values on the RAM disk as a file, use DLL to access the pointer to the appropriate buffer. But it's all a crutch, as you can imagine. It's not clear why I can't normally get programmatically what I already see on the chart.

And I have quite a few of these indicator research tools, which are completely on OOP and event model.

 
pako:

shows data from buffer 0

What is written is what is shown

Please change the indicator and EA so that they do not print to the log. And the EA shows the value of the indicator buffer, where the mouse is hovered. I have given an example of such an EA.

You don't show the source code, so you must understand some skepticism towards ex4, where there are various ways to create the appearance that everything is as you want to show it.

If you refuse, then all that remains is to thank me for my time, but in vain.

 
comp:

I have a probability function that shows the level of the most likely price bounce back. This is an approach I picked up in HFT, that when price has jumped sharply 10 pips up, there is a high probability over the near term that it will bounce back. The further the time, the lower the probability. Well this is on the fingers to make it clear that the example is more or less real and not from one place.

So, the indicator shows this level. Shows is a visualisation that I can see with my eyes on the chart. I control the parameters of the probability function with graphical objects and with the keyboard. It turns out that besides the fact that the indicator lives from the timer (as I said above, the probability function is strongly time-dependent (minute bars - too crude)) There is also a dependence on the EventChart. It turns out to be a research tool where I can regulate the indicator values with my mouse and keyboard according to my view of the curve and my idea of the current market, the way I see the most correct.

The Expert Advisor should perceive this adjusted indicator as it is on the chart. I know perfectly well that we can write the values on the RAM disk as a file, use DLL to access the pointer to the appropriate buffer. But it's all a crutch, as you can imagine. It's not clear why I can't normally get programmatically what I already see on the chart.

And I have quite a few of these indicator research tools, which are completely on OOP and event model.

Move the calculation part to the EA.
Let it run on timer and react to events.

And let the indicator draw ready curves with selected parameters. It will react faster, and it will not react on ticks, but on chart events.
Parameters are easier to pass because there are not many of them (it's not a buffer with values). For example, through Main Variables or through the same custom events.

There was an example on the forum how to pass large data arrays between the indicator and the Expert Advisor, it worked fast. But it is not necessary if we are talking about a few parameters.

This is exactly what I wanted to say - the Expert Advisor should adjust, the indicator should draw.

 
Andrey Khatimlianskii:

Move the calculation part to the EA.
Let it run on a timer and react to events.

And let the indicator draw ready curves with selected parameters. It will react faster, and it will not react on ticks, but on chart events.
Parameters are easier to pass because there are not many of them (it's not a buffer with values). For example, through Main Variables or through the same custom events.

There was an example here on the forum of how to race large data sets between the indicator and the EA, it was quick. But it is not necessary if we are talking about several parameters.

This is exactly what I wanted to say - the EA should adjust, the indicator should draw.

Of course, I know how to bypass and create the N-th crutch that will work. And I have talked about it. Please note the following.

For some reason you still can't make a human readout of the indicator data from the chart!

It simply can't be done (and there are no big data transfers, for that matter). GetPtr has proved it)! And I cannot "care about users" that they don't "hammer nails with a microscope". Architecturally, it is precisely you who suggest a crooked design by your logic.

Because you will have to get sophisticated for every option.

Forum on trading, automated trading systems and testing trading strategies

Reading indicator buffers set to chart

comp, 2016.03.14 09:19

This is the problem. There are two such live indicators. I needed to determine the moment when the average difference between them reaches a certain threshold (this is where you need to be able to do the subjob in the same Expert Advisor). And at that moment to dump their values into a file for further analysis. Or if not to reset, then at least to send a signal to the indicator, so that they froze in this state.
 
comp:

You should try contacting Service Desk. Explain everything to them in detail and show them. They might be able to suggest something. But not for sure it will be fast.

Yes, if they answer, please post the answer here.

 
comp:

Of course, I know how to get around and create an N-th crutch that will work. And talked about it.

Not a workaround, but an approach from the right side.
I didn't say that developers care about us not getting this data. It's just that if you use the tools as intended, it won't be necessary.
You don't try to boil water by sticking a bag of water in a toaster, do you?

Once again - I don't mind the graph data being available. In some cases, when the indicators are ready and working, it will be more convenient.
But this is not a necessity for the mass user, but a solution to a single problem.

IMHO.

 
Andrey Khatimlianskii:

You do not try to boil water by sticking a bag of water in a toaster, do you?

Your suggestion strikes me as exactly that - absurd.

Most likely, you have not encountered such "strange" tasks, which is why you have such an IMHO.

The event-driven model is exactly in the indicator which draws - it is very convenient. Moreover, I set a dozen buffers but only draw one/two. The rest are auxiliary info on each bar, seen by CTRL+D. It does help to understand a lot when exploring.

But judging by the statements in this thread, hardly anyone understands it. Even OOP in indicators begs the question "Why?". You have to try it out to understand it.

I have an OOP channel indicator that immediately calculates the equity (on every bar and other custom criteria) when traded on it. At the same time, when changing parameters on the fly, I see (right on the chart) how trades are changed. No tester is needed and everything is interactive. But to change the logic of constructing a channel, you only need to use inheritance and register a few strings responsible only for the algorithm of the channel. Everything else will be done automatically due to OOP.

In general, there are tasks, where in indicators everything looks good only through OOP. The same is true for the event model in indicators. But to be honest, I have not seen such solutions in the public domain. Perhaps this is a very niche product for geeks and only for yourself.

 
Alexey Kozitsyn:

You should try contacting Service Desk. Explain everything to them in detail and show them. They might be able to suggest something. But not for sure it will be fast.

Yes, if they answer, post the answer here, please.

Dispatch #1428577.

 
comp:
It is impossible to write an Expert Advisor that would receive buffer values of the indicators running on a chart with non-default input parameters. Because iCustom is implemented in such a way, that it requires writing its own call in the SOURCE for each indicator.
Possible. Code the indicators in a sane way.
 
comp:

Aggression is inversely proportional to argumentation! Which link is the one in question - I don't understand.

Indicator and EA codes were given. It's shown that you can't get buffers in some cases through iCustom. So the headline is not just correct, it is also proven.

With iCustom restrictions of a different sort, it's similar. What's the point of your "you can" and "I don't see a problem" if nothing else is said? Stay out of the thread then, since you can't contribute anything constructive.

The only thing you need is a link to a primer so that you can learn to read.