[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 151

 
alex12:

Can you tell me why the EA does not open a position when testing, I'm not sure why - I think I wrote the code correctly.


When opening a market order (OP_SELL or OP_BUY), only the latest Bid (for sell) or Ask (for buy) prices may be used as the opening price.

something like this.

 
alex12:

Can you tell me why the EA does not open a position when testing, I do not understand why - the code seems to be written correctly.


How can one value be higher and lower than another at the same time?

if ( price[0]<WMA0 && price[0]>WMA0 )
 
alex12:

Please tell me why the EA does not open positions when testing, I don't know why - I think I wrote the code correctly.


Also, call the indicator with a period of averaging 1 and five times, this time)

and two) the MODE_PLUSDI line where it is from in this indicator

Indicator line identifiers used when calling iBands(), iEnvelopes(), iEnvelopesOnArray(), iFractals() and iGator():

Constant Value Description
MODE_UPPER 1 Upper line
MODE_LOWER 2 Bottom line
 

Hello, everyone. A simple question.

I have a task: in indicator parameters we need to introduce a variable in which we could set a condition for if statement

For example, there is a variable:

(type?) Peremennaya="(x>y)" ;

if (Peremennaya)

{

.......

}

How to implement? Very much needed to change conditions to the prescribed algorithm.

Thank you in advance.

 
There are functions for this
 
Fartarantula:

Hello, everyone. A simple question.

I have a task: in indicator parameters we need to introduce a variable in which we could set a condition for if statement

For example, there is a variable:

(type?) Peremennaya="(x>y)" ;

if (Peremennaya)

{

.......

}

How to implement? Very much needed to change conditions to the prescribed algorithm.

Thanks in advance.

How about this :

bool Peremennaya=false;
 
  if(x>y)Peremennaya=true;  
   if(Peremennaya==true)
     {
     .........
     }
 
bool Compare(double x,double y){
   if(x>y){return(true);}
   return(false);
}

void start(){
   if(Compare(x,y)){
      ... bla bla bla
   }else{
      ... bla bla bla
   }
   ... bla bla bla 
  
}
 

Gentlemen, you are offering me a hard condition and a sample.

My task is to change the area miscalculation forum in the parameter when running the indicator. I.e.

There is a certain area on the chart with different characteristics, for example (a,b,c,d,e....)

Depending on the condition of checking of the price behavior in the area, a Fiba from the area is drawn.

The checking conditions are the formula, i.e. the variable that can be changed as you want.

For example:

if ((a>b)<(c/d+4).........+10*a) is a rigid and unchangeable condition binding.

{

ObjectCreate(Fiba....)

}

I need the "external variable" to be modifiable by the user via the indicator parameter dialog,

thereby allowing to modify the test conditions.

if(external variable)

{

ObjectCreate(Fiba....)

}

 

Either you don't know how to ask the right questions, or if I understand you correctly, you have to write a detailed text string parser with a keyword detector and a full description of what follows. You either don't know or confuse the concepts.

1) a variable is not an expression, but its value.

2) An external variable is a constant and cannot be initialized by an expression.

 
FAQ:

..............

2) The external variable is a constant and cannot be initialized by an expression.

I.e. it turns out that externally I cannot change the contents of the condition, when checking it, an expression is executed.

Isn't there any way to do it?

Reason: