[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 238

 

Dear Roman - I'm BLOWN!!!! and I'm familiar with F1. When I make a separate indicator with one buffer then in the EA:

double Ind=iCustom( , , ,"XXXX",0,0)

Then everything is transmitted as it should be.

 
deyron:

Dear Roman - I'm BLOWN!!!! and I'm familiar with F1. When I make a separate indicator with one buffer then in the EA:

Then everything is transmitted as it should be.

Response:

внеш.парам. индика

... - List of parameters (if necessary). Transmitted parameters should correspond to the order of declaration and type of external (extern) variables of the custom indicator.

double Ind=iCustom( , , ,"XXXX",внеш.парам. индика,7,0) - получение значения пользовательского индикатора из 8 (ВОСЬМОГО) буфера на текущей свече.
 
Thank you so much!)
 
costy_:

To be safe (some DTs), first open the pose, then modify the stops separately in the cycle if the modification does not work on the tick!

You can use this

"Lock" Error 130

or code a studio (need to see what's written there ))).

THANKS A LOT!!!!!

Will try it out on monday....

 

Gentlemen, help me out where I screwed up))

#property indicator_buffers 1

double Crit[];
bool Crit1;
//+------------------------------------------------------------------+
int init()
  {
   SetIndexBuffer(0,Crit);
   return(0);
  }
//+--------------------------+
int start(){
  Crit[0]=Crit_div();
   return(Crit1);}
//+--------------------------+
double Crit_div(){
   double MA_5_1=iMA(NULL,0,5,0,MODE_SMA,PRICE_CLOSE,0);
   double MA_5_2=iMA(NULL,0,5,0,MODE_SMA,PRICE_CLOSE,1);
   double MA_5_3=iMA(NULL,0,5,0,MODE_SMA,PRICE_CLOSE,2);   

   double MA_8_1=iMA(NULL,0,8,0,MODE_SMA,PRICE_CLOSE,0);
   double MA_8_2=iMA(NULL,0,8,0,MODE_SMA,PRICE_CLOSE,1);
   double MA_8_3=iMA(NULL,0,8,0,MODE_SMA,PRICE_CLOSE,2);   
   
   
   if(MA_5_1>MA_8_1 && MA_5_2<=MA_8_2 && MA_5_3<=MA_8_3 )
   Crit1=true;

   if(MA_5_1<MA_8_1 && MA_5_2>=MA_8_2 && MA_5_3>=MA_8_3 )
   Crit1=false;

   return(Crit1);}


In the Expert Advisor we write:

   double Sign=iCustom(Symbol(),0,"1111",0,0);

With Comment we get 0 or 1. What we wanted. Further: Since buffers from 0 to 5 are busy in the indicator, I do the following:

#property indicator_buffers 6

double Crit[];
bool Crit1;
//+------------------------------------------------------------------+
int init()
  {
   SetIndexBuffer(5,Crit);
   return(0);
  }
//+--------------------------+
int start(){
  Crit[5]=Crit_div();
   return(Crit1);}
//+--------------------------+
double Crit_div(){
   if(//условие)Crit1=true;
   if(//условие)Crit1=false;
   return(Crit1);}

In the Expert Advisor we write:

   double Sign_diver=iCustom(Symbol(),0,"1111",5,0);

Through Comment we get:2146487826. Although I expected to see 0 or 1((((

 
deyron:

Gentlemen, help me out where I screwed up))

In the Expert Advisor we write:

With Comment we get 0 or 1. What we wanted. Further: Since buffers from 0 to 5 are busy in the indicator, I do the following:

In the Expert Advisor we write:

Through Comment we get:2146487826. Although I expected to see 0 or 1((((






Need the full code for the indicator
 

help with a solution...

there is an order at 1.1111. how do i check if there are more open orders within 5 pips of it? ((

 
 
Hello
My MetaEditor doesn't seem to want to work
I press compile and it doesn't do anything
//+------------------------------------------------------------------+
//| script program start function                                    |
//+------------------------------------------------------------------+
int start()
  {
//----
Comment("Hello");
//----
   return(0);
  }
//+------------------------------------------------------------------+
I don't know if anyone has a problem with it.
 

Thanks. I've seen that. But it's -

Возвращает флаг существования позиции или ордера около рынка

and i need it not near the market but near a specific price.

Example: The market is at 1.3262, I need to know within 5 pips of 1.1111

Reason: