Coding help - page 129

 
WR1:
Thanks, i was thinking the 1 and 0 maybe the answer as seems to be the case for the function in alerts on closed etc

but unfortunately my understanding of code is very limited

is there any chance you can add or change it on itrend - then i can try it on others

thanks alot

WR1

You do not need to change the indicator itself (and it is better to keep it working as any usual and normal indicator - otherwise there could be a lot of confusion). With the bar number in the iCustom() call(that number 1 or 0) you decide in the call to the indicator which value you want to use and that way it is much more flexible (at least that is my opinion)

 

Hi Mladen

thanks for the reply again

but unfortunately i don't even know what i custom or call is or where to find them

is there any chance of an example please

thanks alot

 
WR1:
Hi Mladen

thanks for the reply again

but unfortunately i don't even know what i custom or call is or where to find them

is there any chance of an example please

thanks alot

WR1

Go to line 204 of the indicator you posted and you will see an example of iCustom() call of an indicator there. Help documetation for it is the following :

double iCustom(stringsymbol,inttimeframe,string name,...,intmode,int shift)

Calculates the specified custom indicator and returns its value. The custom indicator must be compiled (*.EX4 file) and be in the terminal_directory\experts\indicators directory.

Parameters:

·symbol - symbol the data of which should be used to calculate indicator. NULL means current symbol.

·timeframe - timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.

·name - custom indicator compiled program name.

·... - parameters set (if necessary). The passed parameters and their order must correspond with the declaration order and the type of extern variables of the custom indicator.

·mode - line index. Can be from 0 to 7 and must correspond with the index used by one of SetIndexBuffer functions.

·shift - index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).

 

Thanks very much

its starting to give me a headache

but much appreciated

 
freakout:
sorry, I attached a wrong indicator... here is the right one

This is how it looks like when it is made dot on chart only. The original in the subwindow is there for comparison only

 

thanks mladen for your help I have yet one question... how to make an arrow looking like these here - https://www.mql5.com/en/code/mt4/c/codebase/2011/04/ts.png ?

 
freakout:
thanks mladen for your help I have yet one question... how to make an arrow looking like these here - https://www.mql5.com/en/code/mt4/c/codebase/2011/04/ts.png ?

Like this happy trading

 

thanks a lot once again

 

General Programming Questions

Dear community,

I'm trying to invent a litte ea. It should open orders if a blue arrow appears and close on a similar sign.

How can I identify these arrows which are of another indicator on the chart?

Best regards

Max

EDIT: There are blue and red arrows which appear on the chart. How can I identify when they appear and then send orders? Or can I just send orders within the indicator file? Is this possible? These orders should close when a blue or red dot appears.

 
arroganzmaschine:
Dear community,

I'm trying to invent a litte ea. It should open orders if a blue arrow appears and close on a similar sign.

How can I identify these arrows which are of another indicator on the chart?

Best regards

Max

EDIT: There are blue and red arrows which appear on the chart. How can I identify when they appear and then send orders? Or can I just send orders within the indicator file? Is this possible? These orders should close when a blue or red dot appears.

It depends if those are objects or buffers

If they are objects you have to know their names in order to detect them on chart

If they are buffers, you should call the indicator using iCustom() function (some more info of how to use iCustom() function you can find at this thread : https://www.mql5.com/en/forum/173108

Reason: