An advisor without an indicator. Is this possible? - page 2

 

When using an unsyndicator approach, it makes sense to refuse from OHLC price representation and take all ticks in a row, or thin them using a timer. On ticks thinned by a timer, all sorts of averages can be calculated.

If OHLC, and necessarily all of them, are necessary, then the indicator approach is needed.

 
anim:
I want the Expert Advisor not to be tied to an indicator. Itwould calculate the bars and take buy/sell signals internally. Is it possible?
Not only possible, but necessary.
 
.
 
The same zigzag is essentially not an indicator, but an array of vertices. Drawing it in bars for all bars can be a completely unnecessary waste of resources.
 
Dmitry Fedoseev:

Well any of the adepts and apologists for indicators in EAs, show me an example of EMA calculation in EAs.

Using SMA as an example

SMA=0;

for(i=10; i<=0; i--)SMA=SMA+Close[i];

SMA=SMA/11.0;

 
Renat Akhtyamov:

using the SMA as an example

SMA=0;

for(i=10; i<=0; i--)SMA=SMA+Close[i];

SMA=SMA/11.0;

I have to run in a loop every time? It would be even more interesting with EMA.

 
Dmitry Fedoseev:

And run every time in a cycle? It would be even more interesting with EMA.

Actually, it's much easier to do it just once than to do all the bars of history.

Who needs them all?

 
Renat Akhtyamov:
Actually, it is much easier to calculate just one time, than to calculate all the bars of history.

A normal indicator counts all the bars only at the start, and then it counts 1 bar afterwards. In the indicator it is easy to make SMA in such a way, that even at the calculation of 1 bar there is no need to cycle through the whole period of MA.

Of course, we can create array buffers in the Expert Advisor. But why, when there is a specially designed element - indicators?

 
Dmitry Fedoseev:

A normal indicator counts all the bars only at the start, and then it counts 1 bar afterwards. In the indicator it is easy to make SMA in such a way, that even at the calculation of 1 bar there is no need to cycle through the whole period of MA.

Of course, we can create array buffers in the Expert Advisor. But why, when there is a specially designed element - indicators?

First, who prevents you from having an internal data array, the same as the indicator buffer, and fill it in the same way.
Secondly, why do we need the entire history for the Expert Advisor? As a rule, the last and maybe the penultimate value. And we don't need all of this indicator stuff.
 
Nikolai Semko:
why an advisor needs the whole story. As a rule, the last, and maybe the penultimate value. And don't do all this indicator stuff.

A dangerous misconception.

Reason: