This forum is in read-only mode now. You may discuss your questions on forums of MQL4.community and MQL5.community

Please help......


Back to topics list  | 1 2
avatar
14
Alexantry 2005.07.18 16:48 
"EasyLanguage" code ,can you change to MT4 Language?
avatar
44
cori 2005.07.19 12:19 

Hello Alexantry,

seems not to be so difficult, but there are things I don't understand:

value0 trough value4: where are these variables defined?
What does SwingHigh/SwingLow? how are they calculated?

Do you have a EL - Reference?

regards, cori
avatar
14
Alexantry 2005.07.19 17:15 
Swing High
avatar
14
Alexantry 2005.07.19 17:16 
Swing Low
avatar
14
Alexantry 2005.07.19 17:19 
avatar
44
cori 2005.07.19 23:36 
What means this:

blBlue= Average(value0,13)[8]; {blue}
avatar
14
Alexantry 2005.07.20 05:00 
Average
avatar
44
cori 2005.07.20 13:17 

Yes, ok, but what means the [8] in blBlue= Average(value0,13)[8]; {blue}

cori
avatar
14
Alexantry 2005.07.20 16:50 
Maybe it is color...
avatar
44
cori 2005.07.21 01:01 
Ok, now we have all things together, I wonder how this can go.

1. in function Average, there is a parameter price, which must be in fact an array, because only in an array you can loop through elements.

2. This function Average is called in the main routine with a field, which seems NOT to be an array, because it is calculated by ( h + l ) / 2 which only can be interpreted as ( High[0] + Low[0] ) / 2.

3. Another Question is open, if we look at the usage of the function Average. As far as I see, the return value should be a double, because it is the sum of the price array. But at the place where it is called, there we see something like blBlue= Average(value0,13)[8]; Again, what is the [8] for? It seems, that this should be the eight Element of an array, so the only way to interpret this for me is, that Average must return a array.

This is driving me mad.

Also, many of the variables are not defined. This is, by the way, not good programming style.

Are you sure, that your indicator is running?

Either, I am not able to understand these simple Average function or you have programmed something ugly which can not run.

Can you tell me where the code for Average and SwingHigh/SwingLow is from? Also do you have a reference guide? or an online access to it?

Thanks, cori
avatar
14
Alexantry 2005.07.21 08:15 
I only can tell you this url " http://trader.online.pl/ELZ/t-i-.html ".
Back to topics list   | 1 2  
Download MetaTrader 5 (450 Kb, web installer) — a new terminal for financial markets