Coding help - page 140

 

Dear Mladen / Mrtools

Attached indicator is 'Line version' but is it possible to modify as 'Volty Channel Stop' indicator as shown in picture ?

It would be great if both indicators ( Line & Volty ) change their signal same time (Vertical lines in picture) !

Thanks for any help

secretcode

Files:
 
secretcode:
Dear Mladen / Mrtools

Attached indicator is 'Line version' but is it possible to modify as 'Volty Channel Stop' indicator as shown in picture ?

It would be great if both indicators ( Line & Volty ) change their signal same time (Vertical lines in picture) !

Thanks for any help

secretcode

secretcode

If you mean if the can give signals at the same places, maybe they can using some special settings, but the math behind the two is different and I do not think that it is possible to have all the signals at same places regardless of what settings you use for the two

 

Hey mladen,

we wrote a while ago about my problem. Didn't fix it till yet.

But I have antoher question. I tried to import the indicator with the iCustom()-function.

Isn't it possible to copy the indicator code to the ea and delete all alerts and other functions, but the condition could be checked?

 
mladen:
secretcode If you mean if the can give signals at the same places, maybe they can using some special settings, but the math behind the two is different and I do not think that it is possible to have all the signals at same places regardless of what settings you use for the two

Thanks Mladen for kind reply and explanation

Best Regards

secretcode

 
arroganzmaschine:
Hey mladen,

we wrote a while ago about my problem. Didn't fix it till yet.

But I have antoher question. I tried to import the indicator with the iCustom()-function.

Isn't it possible to copy the indicator code to the ea and delete all alerts and other functions, but the condition could be checked?

arroganzmaschine

The cleanest and the simplest way to do that is using iCustom(). All the other ways are very complicated compared to using a normal indicator and then calling it by using iCustom() and in some cases it is not even possible to do it as it should be done

 

Do I have to import all extern-parameters with the iCustom()-function which are in the indicator? And how are buffers declared?

The indicator says: double Long[]; is a buffer. Am I right?

 
arroganzmaschine:
Do I have to import all extern-parameters with the iCustom()-function which are in the indicator? And how are buffers declared? The indicator says: double Long[]; is a buffer. Am I right?

arroganzmaschine

double Long[] is not a buffer but an array. It becomes a buffer only when you declare it as buffer with SetIndexBuffer() function. But in the EA you can not declare a buffer with SetIndexBuffer(). It will not do anything in the EA (as well as a lot of fnctions specific only to indicators which will not do anything if used from an EA)

If you are not familiar with the arrays and how to work with arrays, I sincerely do recommend that you use a regular indicators and iCustom() calls since it will take you very much time till you learn all necessary to simulate indicator work from EA code without actually having an external indicator

 

How can I get the two different values of a buffer[] or array in this case. Like Long[1] = HIGH and Long[2] = LOW with iCustom-function?

Thanks!

 
arroganzmaschine:
How can I get the two different values of a buffer[] or array in this case. Like Long[1] = HIGH and Long[2] = LOW with iCustom-function? Thanks!

You can not get a value of an array, variable or similar things from an external code

You can get a value of an indicator buffer with a call to iCustom()

Take a look at this thread : https://www.mql5.com/en/forum/173108 and I think that all that is needed to know about iiCustom() calls and what are they doing (including how to access different elements of a buffer) is described there

 

But this doesn't help me. The two buffers are 4 and 5. But the Buffers were arrays before.

here is the code: SetIndexBuffer(4, Long);

SetIndexBuffer(5, Short);

In the indicator, these buffers are declared first with "double Long[]". This buffer has two values. Long[1] and Long[2]. How can I get these values in the expert advisor?