[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 164

 
polsvv:

A simple question. Can you tell me who can :)

If I need to put 2 EAs on one tool.

I open two windows in the terminal and bind my bot to each?

It turns out that the 2nd bot, for example, that works with only 1 market order will not be able to open a deal if there are pending deals opened by the 1st bot?

Or the 2nd bot will be able to close trades of the 1st bot if they meet the closing criteria of the 2nd bot?


Use this code - it will queue orders to server:

if(!IsTradeAllowed()){
  Comment("Торговля запрещена в настройках терминала, либо торговый поток занят");
  Print("Торговля запрещена в настройках терминала, либо торговый поток занят");
  return(0);
}

For an EA to be able to interfere with orders of another EA, you need to use the same magician in both EAs. If the opposite is not the case, the order mages should be different

 
VOLDEMAR:
Thank you .... If it had helped me I wouldn't be asking this question .............


What exactly is the problem?

mode   -   Индекс линии индикатора. Может быть любым из идентификаторов линий индикаторов. 
MODE_UPPER - Верхняя линия 
MODE_LOWER - Нижняя линия 
 
double BBUP =iCustom(NULL, 0, "Bands", "BandsPeriod", "BandsShift", "BandsDeviations",1,0);

double BBDW =iCustom(NULL, 0, "Bands", "BandsPeriod", "BandsShift", "BandsDeviations",2,0);

How to transfer an indicator value to an Expert Advisor using iCustom . Show me once and I'll let it go ......

 
Thank you
 
VOLDEMAR:
double BBUP =iCustom(NULL, 0, "Bands", "BandsPeriod", "BandsShift", "BandsDeviations",1,0);

double BBDW =iCustom(NULL, 0, "Bands", "BandsPeriod", "BandsShift", "BandsDeviations",2,0);

How to transfer an indicator value to an Expert Advisor using iCustom . Show me once and I'll let it go ......

double BBUP =iBands(Symbol(),0,20,2,0,PRICE_CLOSE,MODE_UPPER,0);// верхняя линия на нулевой свече

double BBDW =iBands(Symbol(),0,20,2,0,PRICE_CLOSE,MODE_LOWER,0);// нижняя линия на нулевой свече
In other variables, you can enter the value of indicator lines, taken not from zero, but from another candlestick (it is the last parameter in iBands() function).
 
drknn:


Use this one:

In the user variables we write:

In Councillor Start, write:

After start, in custom subprograms write:

Functions like ModifError() are my custom functions - they just display an error message. Write your own messages instead of them.


Thank you
 
Thanks guys.....
How iCustom is used with iCustom and an indicator that draws an arrow at some point to tell the EA to open .....
If iBands is an Ask > BBUP it's understandable but what about the object which may or may not show up (like arrow) ??????
 
drknn:
In other variables you can enter the value of indicator lines, taken not from zero, but from another candlestick (this is the last parameter in the iBands() function).

I'm not interested in Bollinger Bands, I'm interested in custom Bands because I can set devations below 1,

I got the answer to this question on another forum. How can I use iCustom and an indicator that draws an arrow at some point to tell my EA to open .....?

If iBands is an Ask > BBUP it's understandable but what about the object that may or may not show up (like arrow) ??????
 
drknn:



Excuse me...... the martingale advisor, is it possible to prescribe a stoploss in it or is it not possible. Thank you.
 
VOLDEMAR:
Thanks guys.....
How can iCustom and an indicator that draws an arrow at some point tell my EA to open .....
If iBands is there if Ask > BBUP it is clear but what about the object which may or may not show up (like arrow) ??????


You need to look at the code of the indicator. If the indicator buffers are used for arrows, you can use iCustom() - in this case, when the arrow goes up, its price will be added to the appropriate indicator buffer and the same buffer cell for opposite arrows will have empty value. If the indicator buffers are not used, and the programmer has forced object creation on the chart instead (without using buffers), the indicator code should be changed. Namely: At the moment the arrow is set, the price of this arrow should be added in the global variable of the terminal. These variables are visible in the terminal by pressing F3. There is one variable for upper arrows and another for lower arrows. If there is no arrow on the current candlestick, the value of the corresponding variable of these two variables is cleared. In the Expert Advisor, then all we have to do is to check what exactly we have in these two variables.

Reason: