use iCustom
exemple for up signal buffer 2 :
double up_signal_buffer_2 = EMPTY_VALUE ;
up_signal_buffer_2 = iCustom(NULL,0,"theflegacygtraderjmt4hindicator" , Nbars, FontSize, 2, 1);
then
if( up_signal_buffer_2 != EMPTY_VALUE )
{
Thanks ffoor,
I have adjusted the code but think I may have missed something.
It should open short if
if((perceptron() < 0) && (TradeShort=True) &&(AW < 0 && red_AW != 0.0) && ( down_signal_buffer_3 != EMPTY_VALUE ));
so signals all true. awesome indicator has a red bar and the legacy trader mt4 indicator has printed (Down Trend)
However its opening tickets in both directions. Can ou see the error|?
Thanks for your help
ryangillSL: I would like to add the attached indicator to my EA using icustom.
| Detailed explanation of iCustom - MQL4 forum |
there is too much indicator, down_signal_buffer_3 is a signal, it happen at a bars that will not be the same bars than the red_AW != 0.0
Trend and signal are not the same thing
simplify, maybe, leave only the awesome indicator to fix the EA then add the other features
too much :
if((perceptron() < 0) && (TradeShort=True) &&(AW < 0 && red_AW != 0.0) && ( down_signal_buffer_3 != EMPTY_VALUE ));<- delete that ;
this line is sufficient, leave the perceptron for a while, until it work the way you wish, the perceptron give random signal, :
if(AW < 0 && red_AW != 0.0) { ticket = OrderSend(Symbol(), OP_SELL, lots * 2, Bid, 3, Ask + sl * Point,0, "AI", MagicNumber, 0, Red);
up_signal_buffer_2 = iCustom(NULL,0,"theflegacygtraderjmt4hindicator" , Nbars, FontSize, 2, 1);
input int FontSize = 14;
double A = iCustom(_Symbol,PERIOD_CURRENT,"indicator name",Nbars,FontSize,Buffer)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
I would like to add the attached indicator to my EA using icustom.
What double would I have to declare for uptrend/downtrend ?
Thanks