ICustom question .. - page 2

 
yaniv_av:
Do you have a version of that indicator that dosn't repaint ?

Sorry I dont, but I think there are a few versions out there that dont repaint, although you'll find that the signals from these are probably no better than RSI or stochastics, or even tossing a coin to determine a suitable entry.

Its probably worth spending a couple of hours watching your EA in real time to confirm, I usually drop indicators on the 1 min charts to watch out for them repainting, there's also a couple of good utilities around that will take screen captures every few minutes if you really cant be there to watch.

good luck with it, let us know how you get on

regards

mick

 
yaniv_av:
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 ?

This indicator repaints. Dont use it !!

 

EA using others indicators

Hello all,

Is it possible to write an EA that takes it signals for trades based on someone elses closed source indicators?

I need to write an EA that is customized to the style that I trade so I can actually get some sleep and work and go to school and still make money with forex.

I don't have access to the source for the indicators, but they show visual keys on the chart.

Thank you,

Menelaus

 

The answer is Yes for about 98% of the indicators that end with .ex4. What you have to test is the buffers using the iCustom statement in your ea such as:

double PM1=0, PM1_1=0, PM1_2=0, PM2=0, PM2_1=0, PM2_2=0; //Initializes variable names

PM1=iCustom(NULL,0,"Price Channel",0,0); // Buffer 0, Shift 0 //Note: The Indicator Name (ex. "Price Channel") has to match the file name of the indicator - Case sensitive!

PM1_1=iCustom(NULL,0,"Price Channel",0,1); // Buffer 0, Shift 1 (1-Back)

PM1_2=iCustom(NULL,0,"Price Channel",0,2); // Buffer 0, Shift 2 (2-Back)

PM2=iCustom(NULL,0,"Price Channel",1,0); // Buffer 1, Shift 0

PM2_1=iCustom(NULL,0,"Price Channel",1,1); // Buffer 1, Shift 1 (1-Back)

PM2_2=iCustom(NULL,0,"Price Channel",1,2); // Buffer 1, Shift 2 (2-Back)

//Sample logic code to buy!

if(PM1>PM2 && PM1_1<PM2_1)

{

OpenBuy=1;

}

Continue code of program!

You can change the PM1, PM2 etc. variable to whatever you want to call it.

You will either have to use a comment statement referencing PM1, or a print statement referencing PM1, or use Control-D which opens up a data window on the left side of the graph and may tell you the current indicator buffer values of the current bar.

P.S. You may identify the amount of buffers used in the indicator by the amount of colors it shows in the indicator setup box when you select it from the indicator list by right clicking the mouse after the indicator is on the graph (4 colors = 4 buffers in the indicator). If there are only 2 colors listed, than buffer 0 will be 'Up' direction, and buffer 1 will be 'Down' direction value of the indicator on the current bar.

If you have any other questions, just ask. I hope this helps!

Dave

<<<

 

Thank you for the quick reply Dave, will begin coding my EA soon

 
codersguru:
in XP Worx - Custom MetaTrader (MQL4) Programming and Free Expert Advisors - Indicators - Libraries - Scripts - MetaTrader Extensions (c++ DLLs) 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!

Is the program ready? Can't find it.

Thanks

 
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 :

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(res10)

{

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 !

Hi

I have tried this indicator but Im getting the following error:

OrderSend error 130

Error opening BUY order :130

Have you or someone come across this error and if you might know how to fix it?

Thank you

 

Error 130

There is a thread on Error 130 which I contributed to.

The check on res1 and res0 in the quote is quite dangerous. Res0 is the result of tick by tick input. The value can cross over and under the zero line many times before the bar is complete. Each cross will issue another order, not what you really want.

 
Tzuman:
There is a thread on Error 130 which I contributed to. The check on res1 and res0 in the quote is quite dangerous. Res0 is the result of tick by tick input. The value can cross over and under the zero line many times before the bar is complete. Each cross will issue another order, not what you really want.

Thank you.

 

Dear Codes GURU,

I have got the following scenario....

1) Indicator A which has all the following attributes coded in the file

a) comments

b) drawings line for divergence

c) sound and alert - set to true

If I use iCustom to call indicator A and make some calculation to produce another indicator B, would all of the attributes in the indicators A be showing and triggering in indicator B... this is what is happening to my indicator B...

Is this the case were I have got to REVISIT my codes again SIR....

Your advice and expertise is always highly appreciated....

yours truly

AZRUL...

Files:
indi.jpg  169 kb