[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 1113

 
sergeev:
then filter the time
Thank you, I've just realized that it turns out to be simple, you just need to enter the drawing time there and it will draw what you need, while leaving .... in the calculations Thank you Alexey!)))
 
Can you tell me if it is possible to create a template for an entire profile rather than a separate chart: number of windows, selected TFs, indices on them?
 
brera:
Can you tell me if it is possible to create a template for an entire profile rather than a separate chart: number of windows, selected TFs, indices on them?

yep. It is called "Profile".
 
What's next? I know what the profile is called
 
Let's say I have 5 windows open with differently configured charts in my eurusd profile. Now I need to set up gbpusd as well. I save my previous profile, I go to default profile and there all settings are the same as in eurusd profile, everything is as it should be, just change the instrument (pair)
 
brera:
Let's say I have 5 windows open with differently configured charts in my eurusd profile. Now I need to set up the gbpusd pair as well. I save the previous profile, go to default profile and there all settings are same as in eurusd profile, everything is as it should be just change the instrument (pair)


You set everything as you want and save the profile under the name "brera1". Then set up a second profile and save it under "brera2". And so on.

Then you restore any of the saved profiles.

 
So only manually
 

Dear programming experts, please help me, because I'm starting to lose my mind from one piece of software:

if (ExpOrdersCount >1 && sumB+summS>0)

{

//close all orders at 0

for(int cbb=1; cbb<=OrdersTotal(); cbb++) // Order loop

{

if(OrderSelect(cbb-1, SELECT_BY_POS,MODE_TRADES)==true)

{

if(OrderType()==OP_BUY) OrderClose(OrderTicket(), OrderLots(), Ask, 3,Violet);

if (OrderType()==OP_SELL) OrderClose(OrderTicket(), OrderLots(), Bid, 3,Violet);

}

}

}

For example, if two positions are opened, if the conditions are met, the last order that was opened is not closed; it just remains there.

I will try to formulate my question differently, how to close all orders correctly?

The same problem with modification:

if((priceB+priceS)!=0 && ExpOrdersCount>1)

for(int bez=1; bez<=OrdersTotal(); bez++) // The order loop

{

if(OrderSelect(bez-1, SELECT_BY_POS)==true)

{

if(OrderMagicNumber()==Mag) OrderModify(OrderTicket(),OrderOpenPrice(),OrderStopLoss(),NormalizeDouble(0.5*(priceS+priceB),2),0,Blue);

}

}

The last one is not modified.

 
pr0fess0r64:

I will try to phrase the question even differently, how do I close all orders correctly?

For a multi-currency one will not work.

void closeall()
{
 for(int i=OrdersTotal()-1;i>=0;i--)
      if(OrderSelect(i,SELECT_BY_POS)&&OrderMagicNumber()==Mag&&OrderSymbol()==Symbol())
        {
        if(OrderType()==0)OrderClose(OrderTicket(),OrderLots(),NormalizeDouble(Bid,Digits),10,Red);
        if(OrderType()==1)OrderClose(OrderTicket(),OrderLots(),NormalizeDouble(Ask,Digits),10,Red);
        }
}
 
Techno:

For a multi-currency one, it won't work.

Thank you very much, I will try it in the tester, but do you have any advice on how to modify orders?
Reason: