| New signals service! | |
|
|||||||
| 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 |
|
|
|||
|
|||
|
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);
}
//+------------------------------------------------------------------+
I think the problem is maybe the "shift" parameter ? 10X ! |
|
|
||||
|
||||
|
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! |
|
|
|||
|
|||
|
Quote:
There are no parameters passed to this indicator. Attached here the indicator. 10X ! |
|
|
||||
|
||||
|
Quote:
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 |
|
|
|||
|
|||
|
Quote:
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... Last edited by yaniv_av; 11-25-2006 at 05:51 PM. |
|
|
|||
|
|||
|
Quote:
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 ? |
|
|
||||
|
||||
|
Quote:
Regards zup |
|
|
|||
|
|||
|
Quote:
I'll check it live at monday. Do you have a version of that indicator that dosn't repaint ? |
| Bookmarks |
| Thread Tools | |
|
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Easy iCustom and Alerts! | codersguru | Indicators - Metatrader 4 | 50 | 09-18-2008 01:02 PM |
| iCustom function | homicida | Questions | 56 | 07-28-2008 09:57 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 |