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.
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 ?
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 ?
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...
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 ?
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 ?
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 ?