Forex



Go Back   Forex Trading > Downloads > Indicators - Metatrader 4
Forex Forum Register More recent Blogs Calendar Advertising Others Help






Register
Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.

From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.

Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
  • Elite Section
    Get access to private discussions, specialized support, indicators and trading systems reported every week.
  • Advanced Elite Section
    For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
See more

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 11-25-2006, 05:15 PM
Member
 
Join Date: Oct 2005
Posts: 35
yaniv_av is on a distinguished road
iCustom question ..

Hi,

I want to check if some indicator, let's say Fisher_jurik, is crossing the "0".
I have tried to use iCustom but I don't think I understand how to do it ...
the code is :
Code:
int start()
  {
//----
  int ticket;
   
   if(Volume[0]>1) return;
  
  double res0 = iCustom(NULL,0,"Fisher_Yur4Ik",0,0);
  double res1 = iCustom(NULL,0,"Fisher_Yur4Ik",0,1);  
  
  if(res1<0 && res0>0)
   {
   ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,Ask-SL*Point,Ask+TakeProfit*Point,"temp",16384,0,Green);
   if(ticket>0)
     {
      if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES)) Print("BUY order opened : ",OrderOpenPrice());
     }
   else Print("Error opening BUY order : ",GetLastError()); 
   return(0); 
  }
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
But the results (the buying orders) are not match the graph at all...
I think the problem is maybe the "shift" parameter ?

10X !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #2 (permalink)  
Old 11-25-2006, 05:30 PM
codersguru's Avatar
Senior Member
 
Join Date: Oct 2005
Posts: 994
codersguru has a spectacular aura aboutcodersguru has a spectacular aura aboutcodersguru has a spectacular aura about
Question

Quote:
Originally Posted by yaniv_av
Hi,

I want to check if some indicator, let's say Fisher_jurik, is crossing the "0".
I have tried to use iCustom but I don't think I understand how to do it ...
the code is :
Code:
int start()
  {
//----
  int ticket;
   
   if(Volume[0]>1) return;
  
  double res0 = iCustom(NULL,0,"Fisher_Yur4Ik",0,0);
  double res1 = iCustom(NULL,0,"Fisher_Yur4Ik",0,1);  
  
  if(res1<0 && res0>0)
   {
   ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,Ask-SL*Point,Ask+TakeProfit*Point,"temp",16384,0,Green);
   if(ticket>0)
     {
      if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES)) Print("BUY order opened : ",OrderOpenPrice());
     }
   else Print("Error opening BUY order : ",GetLastError()); 
   return(0); 
  }
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
But the results (the buying orders) are not match the graph at all...
I think the problem is maybe the "shift" parameter ?

10X !
PHP Code:
double res0 iCustom(NULL,0,"Fisher_Yur4Ik",0,0);
double res1 iCustom(NULL,0,"Fisher_Yur4Ik",0,1); 
Where are the paramters passed to Fisher_Yur4Ik?
They should be before 0,0); and 0,1); parameters
__________________
Hope it helps !
Coders' Guru
Senior MQL programmer:
www.xpworx.com/custom.htm
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #3 (permalink)  
Old 11-25-2006, 05:33 PM
codersguru's Avatar
Senior Member
 
Join Date: Oct 2005
Posts: 994
codersguru has a spectacular aura aboutcodersguru has a spectacular aura aboutcodersguru has a spectacular aura about
Lightbulb iCustom generator!

in www.xpworx.com they are building iCustom generator (which I'm helping them in with the mql4 language!)

The program takes .mq4 file and which line to use as parameters and return mql4 code generated!

I'll inform you when it's done and be online!
__________________
Hope it helps !
Coders' Guru
Senior MQL programmer:
www.xpworx.com/custom.htm
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #4 (permalink)  
Old 11-25-2006, 06:00 PM
Member
 
Join Date: Oct 2005
Posts: 35
yaniv_av is on a distinguished road
Quote:
Originally Posted by codersguru
PHP Code:
double res0 iCustom(NULL,0,"Fisher_Yur4Ik",0,0);
double res1 iCustom(NULL,0,"Fisher_Yur4Ik",0,1); 
Where are the paramters passed to Fisher_Yur4Ik?
They should be before 0,0); and 0,1); parameters
Hi !

There are no parameters passed to this indicator.
Attached here the indicator.

10X !
Attached Files
File Type: mq4 Fisher_Yur4ik.mq4 (2.0 KB, 45 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #5 (permalink)  
Old 11-25-2006, 06:10 PM
codersguru's Avatar
Senior Member
 
Join Date: Oct 2005
Posts: 994
codersguru has a spectacular aura aboutcodersguru has a spectacular aura aboutcodersguru has a spectacular aura about
Quote:
Originally Posted by yaniv_av
Hi !

There are no parameters passed to this indicator.
Attached here the indicator.

10X !
That's right! The indicator uses no parameters and has only one buffer (it has 3 buffers but 2 of them are disabled by SetIndexLabel(1,NULL)).

So your iCustom code is correct:

double res0 = iCustom(NULL,0,"Fisher_Yur4Ik",0,0); //Current bar
double res1 = iCustom(NULL,0,"Fisher_Yur4Ik",0,1); //Previous bar
__________________
Hope it helps !
Coders' Guru
Senior MQL programmer:
www.xpworx.com/custom.htm
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #6 (permalink)  
Old 11-25-2006, 06:46 PM
Member
 
Join Date: Oct 2005
Posts: 35
yaniv_av is on a distinguished road
Quote:
Originally Posted by codersguru
That's right! The indicator uses no parameters and has only one buffer (it has 3 buffers but 2 of them are disabled by SetIndexLabel(1,NULL)).

So your iCustom code is correct:

double res0 = iCustom(NULL,0,"Fisher_Yur4Ik",0,0); //Current bar
double res1 = iCustom(NULL,0,"Fisher_Yur4Ik",0,1); //Previous bar
So why the results are seems not match the graph ??
Here is a simple EA that I wrote. It should buy when the indicator is crossing the zero up.
Try to backtest it with visual-mode, and you'll see that the buy's orders are not at the right place all over the graph... Or no order is made at a right place...
Attached Files
File Type: mq4 temp.mq4 (1.9 KB, 46 views)

Last edited by yaniv_av; 11-25-2006 at 06:51 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #7 (permalink)  
Old 11-25-2006, 08:23 PM
Senior Member
 
Join Date: Nov 2005
Posts: 168
mangman is on a distinguished road
Maybe the last loop of the indicator has an error:

for(i=limit-2; i>=0; i--)


Maybe it should be

for(i=limit; i>=0; i--)

Last edited by mangman; 11-25-2006 at 08:28 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #8 (permalink)  
Old 11-25-2006, 08:34 PM
Member
 
Join Date: Oct 2005
Posts: 35
yaniv_av is on a distinguished road
Quote:
Originally Posted by mangman
Maybe the last loop of the indicator has an error:

for(i=limit-2; i>=0; i--)


Maybe it should be

for(i=limit; i>=0; i--)
I changed it - but I'ts not the problem.
Here is a screenshot of some visual backtest.
As you can see from the picture:
On the rectangles - Why it opens an order ?
On the triangles - Why dosn't it open an order ?
Attached Images
File Type: jpg jurick.JPG (122.2 KB, 264 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #9 (permalink)  
Old 11-25-2006, 10:01 PM
zupcon's Avatar
Senior Member
 
Join Date: Dec 2005
Location: Malta
Posts: 266
zupcon is on a distinguished road
Quote:
Originally Posted by yaniv_av
On the rectangles - Why it opens an order ?
On the triangles - Why dosn't it open an order ?
I havnt looked at this indicator for a while, but I do know that a lot of the original versions used to repaint the past. Are you 100% sure that this isnt happening ?

Regards
zup
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #10 (permalink)  
Old 11-25-2006, 10:07 PM
Member
 
Join Date: Oct 2005
Posts: 35
yaniv_av is on a distinguished road
Quote:
Originally Posted by zupcon
I havnt looked at this indicator for a while, but I do know that a lot of the original versions used to repaint the past. Are you 100% sure that this isnt happening ?

Regards
zup
Oh, well I did'nt know that...
I'll check it live at monday.
Do you have a version of that indicator that dosn't repaint ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
Reply

Bookmarks

Tags
icustom


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
iCustom function homicida Metatrader 4 mql 4 - Development course 100 09-03-2009 03:50 AM
Easy iCustom and Alerts! codersguru Indicators - Metatrader 4 58 04-13-2009 09:30 AM
icustom maje Questions 24 12-05-2007 10: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 08:18 PM
iCustom() problem billritz Indicators - Metatrader 4 5 08-23-2006 08:22 AM


All times are GMT. The time now is 12:31 AM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.