|
|||||||
| Register in Forex TSD! | |
|
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time). Click here to register and get more information |
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
iCustom function
hi there
first i must say really lots of helpfull info on the board here its great ![]() next my question how do i get the indicatorresult (or other variable) as a returnvalue if i call it with icustom ? i tryed to analyze the code of some other indicators for that part but... theres no difference (or i missed it ). so how does it work? greets homi ![]() |
|
|||
|
hi and sorry
tj for answering
![]() oh you missunderstund me ![]() its my crapy english ...sorry! normally i know how to call a indicator with icustom(), but when i try to call LSMA trendindicator then it gives me back the value "1" all the time ,no madder what the trend really is now it returns allways one value.... "1". so i thought that the 1 it returns is some kind of errorcheck that returns true or false. but i need to know what the trend is and have to add some code to the indicator that gives me back the trendvalue not the errorcheckvalue. and my question above means :what code to add to the indicator to get the trendvalue instead of errorcheck value back when i call it with icustom(). greets homi |
|
||||
|
Quote:
I didn't misunderstand you. I gave you working example of iCustom. Anyway. this is a line of code which will get the value of LSMA using iCustom. Note: I used LSMA in color (Lsma) Code:
Alert(iCustom(NULL,0,"LSMA in Color",14,1500,0,0)); parmeter 2 : time frame - 0 for current time frame. parmeter 3 : indicator name - here it's "LSMA in Color". parmeter 4 : this is a setting for LSMA - Rperiod = 14. parmeter 5 : this is a setting for LSMA - Draw4HowLongg = 1500. parmeter 6 : the line number (range from 0 to 7) - usually used 0. parmeter 7 : the working bar - 0 for the current bar. Please try this line of code and tell me . |
|
|||
|
hi
![]() i tested it ,your code works well..... but that dosent fix the problem^^ i got the returnvalue like you said but its allways the same value no madder what the trend really is its 214783647 all the time. i searched the value in the indicatorcode there are 3 buffers and the buffer that holds the 214783647 is the trend not the value that stored in it like if buffer1 holds the 214783647 means trend up,other 2 buffers holds then something like 174... if buffer2 holds the 214783647 means trend down,other 2 buffers holds then something like 174... could that cause the problem? greets homi |
|
||||
|
Quote:
I think there's an error in your iCustom call. Anyway, here is the code which will call iCustom of LSMA to return the value of its 3 lines. Note 1: The values of the 3 lines are the same because LSMA is color indicator (if you want to know more ask me) Note 2: 214783647 is an error. I included in the demo example some lines of code which will return the same error to make it clear for you. PHP Code:
|
|
|||
|
hi again:D
okay im defeated by the indicator lol
![]() i cant get it to work like i want ![]() you say its an colorindicator what does that mean? and the most important thing is how do i get the current state of it? i allways get only wired number from it that looks like a rounded version of the closeprice in all three lines ,even with your unmodified demo ( indicator and demo). what am i missing ? how do i convert the output in a simple "green" "red" "yellow" string? greets stressed homi |
|
||||
|
Quote:
![]() Did you try the demo and still getting wrong numbers? Could you tell me the Alerts you've got? that's what I've got (2 minutes ago) |
|
||||
|
Quote:
Line 1 Alert: is the value of the first buffer or LSMA (ExtMapBuffer1) Line 2 Alert: is the value of the second buffer or LSMA (ExtMapBuffer2) Line 3 Alert: is the value of the third buffer or LSMA (ExtMapBuffer3) Then I wrote three iCustoms' calls with intentionally wrong parameters to show you what probably be wrong in your iCustom's call. Could you tell me exactly what do you want to do? Maybe I can help! ![]() |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| iCustom question .. | yaniv_av | Indicators - Metatrader 4 | 16 | 06-20-2008 04:37 PM |
| Easy iCustom and Alerts! | codersguru | Indicators - Metatrader 4 | 46 | 03-06-2008 04:25 AM |
| icustom | maje | Questions | 24 | 12-05-2007 09:26 AM |
| I need help on creating an Icustom statement for my EA using this indicator as input! | iscuba11 | Expert Advisors - Metatrader 4 | 4 | 09-11-2006 07:18 PM |
| iCustom() problem | billritz | Indicators - Metatrader 4 | 5 | 08-23-2006 07:22 AM |