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

 

One more question. There is a code:

if(Otlov)//If allowed to catch the percentage of deposit increase
{
Balans=AccountBalance();//Account balance
Free=AccountEquity();//Current amount of money in the funds item
if ((Free-Balans)>=(Balans/100*Pojmat))//If money became sufficient
{
Print("Deposit increased by ",Pojmat," percent."{,"\n", "Closing positions.");
Comment("Deposit increased by ",Pojmat," percent.","\n", "Closing positions.");
if (DelOtlozh)
{
DeleteAllOrders();//delete all orders
Sleep(5000);
RefreshRates();
}
else
{
DelRynochn();
Sleep(5000);
RefreshRates();
}
SchOrders();
}

How to disallow further tracking of if(Otlov) condition at the same time as the order to delete orders ?

Thank you in advance

 
put Otlov=false
 

Hello.

Can you tell me how to tame the indicator to the tester, if iBars and iHigh and iLow are used in the loop . I've looked through the material on the forum, but haven't found an answer. iHigh and iLow could be adjusted based on the information available, but they are used in a loop and this makes it difficult for me to find one. Can you point me in the right direction..... please....

Files:
 
dzhini:

Hello.

Can you tell me how to tame the indicator to the tester if it uses iBars as well as iHigh and iLow in the loop .


Hi, is using iHigh, iBars a contraindication for use in the tester? Explain exactly what you are confused about?
 
The indicator uses three channels on different TFs. I want to use it on 15 min with settings of 60-240-1440. When I throw it on the tester chart, it draws lines in rather unexpected directions instead of channels. I can only blame it on i, as I was fixing something similar at fibo levels and murray. But there were static objects, so it was easier to find a solution. In this case I can't cope with it.
 
dzhini:
The indicator uses three channels on different TFs. I want to use it on 15 min with settings of 60-240-1440. When I throw it on the tester chart, it draws lines in rather unexpected directions instead of channels. I can only blame it on i, as I was fixing something similar at fibo levels and murray. But there were static objects, so it was easier to find a solution. In this case I can't cope with it.
Probably the tester does not have enough history to render it.
 
dzhini:
I tried. I waited for two weeks, I didn't have the patience for more. If there are 100 bars on the screen. 100 daily bars equals 3.5 months. Maybe there's a more elegant solution?
You said that on the 15 minute...
 

Guys Important Help ......

How can I teach my EA to distinguish between orders of different currency pairs when it is attached to one pair ?????

 
VOLDEMAR:

Guys Important Help ......

How to teach my EA to distinguish orders of different currency pairs when it is attached to one pair ?????


We can use MAGIC to enable it to see only the orders of the pair on which it is standing. The code will be of the following type:

if(OrderSymbol()!=SMB || OrderMagicNumber()!=MAGIC) continue;

 
VOLDEMAR:

Guys Important Help ......

How to teach EA to distinguish orders of different currency pairs when it is attached to one pair ?????


Go through the list of orders. Select the next order. Then we look at it:

if(OrderSymbol()=="EURUSD"){
  // то выполняем какие-то действия
}
if(OrderSymbol()=="GBPUSD"){
  // то выполняем какие-то действия
}

And so on.

Reason: