[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
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
then filter the time
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".
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.
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.
I will try to phrase the question even differently, how do I close all orders correctly?
For a multi-currency one will not work.
For a multi-currency one, it won't work.