Forex
Google

Go Back   Forex Trading > Discussion Areas > Setup Questions
Forex Forum Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


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

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-07-2006, 08:54 PM
hayseed hayseed is offline
Junior Member
 
Join Date: Nov 2006
Posts: 3
hayseed is on a distinguished road
2 questions on codergurus course

the icustom function still at times is not working for me.... surely it must be i'm not accurately reflecting the custom indicators 'parameters' section of that line.... for instance, "macd" works perfect... 12,26,9..... but for something like the "fisher transform rsi", i can't get it correct....

in metastock language its always the last line of code from the custom indicator thats referenced.... how can we know what line/data is being referenced in mql... for instance in macd, there are more than one line, each with a value....

and this below is from codersgurus course, what is parameter 5, range?, refering to.... is it perhaps, SetIndexStyle(0,DRAW_LINE); .....


parmeter 1 :the symbol - NULL for current symbol.
parmeter 2 : time frame - 0 for current time frame.
parmeter 3 : indicator name - here it's " Demo_Indicator".
parmeter 4 : this is a setting for Demo_Indicator - UsePeriod = 13.
parmeter 5 : the line number (range from 0 to 7) - usually used 0.
parmeter 6 : the working bar - 0 for the current bar.


like mention before, macd

double CloseBuy1_1 = iMACD(NULL, 0, 12,26,9,0,0, Current + 0);

works fine but

double BuyPreSet = iCustom(NULL, 0, "INV F T RSI v2", 0, Current + 0);

does not.... any clues to why.....

and i did at one point hard code in all external inputs variables, but still no go.....


its the inverse fisher transform of rsi that i'm having difficulty with now, can that be called by the icustom function.... thanks for your thoughts here.....h
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 12-07-2006, 09:04 PM
hayseed hayseed is offline
Junior Member
 
Join Date: Nov 2006
Posts: 3
hayseed is on a distinguished road
buffers

forgot to mention, i also //'ed the 2nd setindex just in case it was causing the error.... its buffer 0 i'm trying to reference anyway......

and good luck tommorrow to all yall news traders.....h

int init()
{
//---- indicators
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,ExtMapBuffer1);
//SetIndexStyle(1,DRAW_LINE);
//SetIndexBuffer(1,ExtMapBuffer2);
//----
return(0);
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 12-07-2006, 10:09 PM
Maji Maji is offline
Senior Member
 
Join Date: Mar 2006
Posts: 787
Maji is on a distinguished road
This is what the help on icustom says:

double iCustom( string symbol, int timeframe, string name, ..., int mode, 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 desclaration 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).

Sample:
double val=iCustom(NULL, 0, "SampleInd",13,1,0);

13 = input required
1 = the 2nd Buffer is being called (use 0 if you want the first buffer)
0 = current bar

for the ifisher

it should be something like this

double val=iCustom(NULL,0,"iFish",0,0);

As there is no input required, that entry is skipped.

Hope this helps.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 12-07-2006, 10:56 PM
hayseed hayseed is offline
Junior Member
 
Join Date: Nov 2006
Posts: 3
hayseed is on a distinguished road
thanks

thanks Maji..... even though i'd read that several times along with codergurus lessons, still it for some reason was unclear.....

also i had several errors in my EA code..... it is the inverse fisher of rsi that i was trying to use, not the ifish....

with your help i figured it out....


double BuyPreset = iCustom(NULL, 0, "INV F T RSI v2", 9,0, Current + 0);


metastock language is my forte, still just now learning mql.... hope to contribute here soon.....

if the EA looks valualble i'll post it or if someone wants it in raw form, i'll post it prior to completion..... thanks again....h
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
Basic questions ... cardio Questions 58 06-27-2008 03:51 PM
Questions on simple EA dwmcqueen Metatrader 4 1 01-04-2007 01:55 PM
Beginner questions. Thanks Locutus General Discussion 2 10-11-2006 07:26 PM
MT3 Questions Nicholishen Metatrader 3 1 02-01-2006 03:10 PM


All times are GMT. The time now is 11:10 AM.