help on iCustom, error calling 1 buffer

 
Hello developers, I have a small issue with iCustom, I don't know what is wrong, each time I call on the buffer responsible for sell trades are picked on every interval (i.e the moment a sell closed another will be opened same moment), but if it was for the buy all works well
here is the snippet of the code below.
what could be the issue please >
//---
   if(iCustom(NULL,0,"reversed",1,1)<Low[1]) // 1 is the buffer that I want a buy order and it works perfectly
      if(OrdersTotal()==0)
         bool k= OrderSend(NULL,OP_BUY,0.01,Ask,500,Bid-100*Point,Bid+100*Point,NULL,333,0,Blue);



   if(iCustom(NULL,0,"reversed",0,1)>High[1])// 0 is the buffer for the sell condition but picks trades on every close of another
      if(OrdersTotal()==0)
         bool k= OrderSend(NULL,OP_SELL,0.01,Bid,500,Ask+100*Point,Ask-100*Point,NULL,333,0,Red);




/// I ony use on condition at a time because of OrdersTotal()==0

  }

 
 
Hello, any idea or help on this please 
 

I really don't understand your issue.

But it might be because you are not loading the indicator from the correct directory. When you place the indicator in the wrong directory or with the wrong name the iCustom returns zero and the logic wont be as you wish.

 
Yashar Seyyedin #:

I really don't understand your issue.

But it might be because you are not loading the indicator from the correct directory. When you place the indicator in the wrong directory or with the wrong name the iCustom returns zero and the logic wont be as you wish.



I did, a buffer is working perfectly but the other is not... 
Same thing for all custom indicators I have 
 
  1. Adebayo Samson Adewuyi: Hello developers, I have a small issue with iCustom, I don't know what is wrong, e
             bool k= OrderSend(NULL,OP_BUY,0.01,Ask,500,Bid-100*Point,Bid+100*Point,NULL,333,0,Blue);
    

    Be careful with NULL.

    1. On MT4, you can use NULL in place of _Symbol only in those calls that the documentation specially says you can. iHigh does, iCustom does, MarketInfo does not, OrderSend does not.
    2. Don't use NULL (except for pointers where you explicitly check for it.) Use _Symbol and _Period, that is minimalist as possible and more efficient.
    3. Zero is the same as PERIOD_CURRENT which means _Period. Don't hard code numbers.
    4. MT4: No need for a function call with iHigh(NULL,0,s) just use the predefined arrays, i.e. High[].
      MT5: create them.
    5. Cloud Protector Bug? - MQL4 programming forum (2020)

  2. Adebayo Samson Adewuyi each time I call on the buffer responsible for sell trades are picked on every interval

    You say that but haven't provided any proof. Show us your indicator.

 
William Roeder #:
  1. Be careful with NULL.

    1. On MT4, you can use NULL in place of _Symbol only in those calls that the documentation specially says you can. iHigh does, iCustom does, MarketInfo does not, OrderSend does not.
    2. Don't use NULL (except for pointers where you explicitly check for it.) Use _Symbol and _Period, that is minimalist as possible and more efficient.
    3. Zero is the same as PERIOD_CURRENT which means _Period. Don't hard code numbers.
    4. MT4: No need for a function call with iHigh(NULL,0,s) just use the predefined arrays, i.e. High[].
      MT5: create them.
    5. Cloud Protector Bug? - MQL4 programming forum (2020)

  2. You say that but haven't provided any proof. Show us your indicator.

here is the attached indicator, if you can help test or anyone
Thanks

Executable file removed by moderator.
 
Adebayo Samson Adewuyi #: here is the attached indicator, if you can help test or anyone Thanks
Executable file removed by moderator.
Do not post executables. If you want help with testing, provide the source code.
 
Fernando Carreiro #:
Do not post executables. If you want help with testing, provide the source code.

 I will send one with the source code, all still the same

 
here is one, the sell not working here too
Files:
 
also another with same issue, every of my custom indicator doing same thing
works fine with a buffer (Buy ) but bad with the other (Sell)
Files:
indicator.mq4  5 kb
Capture.PNG  21 kb
Capture2.PNG  23 kb
 
Fernando Carreiro #:
Do not post executables. If you want help with testing, provide the source code.

Hello, have you helped me test? or know what is wrong
Thanks

Reason: