In short, the problem of not knowing how to check the number of orders on the current chart (Example algorithm - IF on the --(((( LIKE)))) -- open orders <=2 then buy, sell, etc.
- I have all orders and because of the large number of orders does not buy on the currency pair on which it is necessary
In short, the problem of not knowing how to check the number of orders on the current chart (Example algorithm - IF on the --(((( LIKE)))) -- open orders <=2 then buy, sell, etc.
- I have all orders and because of the large number of orders does not buy on the currency pair on which it is necessary
I am looking for an answer.)
I would be very grateful)
int count=0; // счетчик открытых ордеров//--- алгоритм подсчета открытых ордеровif(OrdersTotal()>0)
{
for(int i=OrdersTotal()-1; i>=0; i--)
{
if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
{
if(OrderSymbol()!=Symbol()) continue; // Если не символ текущего графика// перейдём к проверке следующего ордераif(OrderType()==OP_BUY || // если это открытый ордер на покупку или
OrderType()==OP_SELL) // если это открытый ордер на продажу
count++; // увеличение счетчика на 1
}
}
}
//--- покупаем, продаем и т.д.if(count<=2)
{
// ...
}
Dudes who will help this time? - I wrote a code - I got a weird one - I need the price to go from the top to the bottom to themoving average and buy (like a bounce) - if you know the right code, please let me know)))
Tema97: Dudes who can help this time? - I wrote a code - I got a weird one - I need the price to go from the top to the bottom to the moving average and buy (like a bounce) - if you know the right code, please let me know)))
The CodeBase has a ton of EAs and I think you will find some with your algorithm that you can recreate for yourself.
Hi all) decided to make a robot) - ) )
In short, the problem of not knowing how to check the number of orders on the current chart (Example algorithm - IF on the --(((( LIKE)))) -- open orders <=2 then buy, sell, etc.
- I have all orders and because of the large number of orders does not buy on the currency pair on which it is necessary
I am looking for an answer.)
I would be very thankful)
Hi all) decided to make a robot) - ) )
In short, the problem of not knowing how to check the number of orders on the current chart (Example algorithm - IF on the --(((( LIKE)))) -- open orders <=2 then buy, sell, etc.
- I have all orders and because of the large number of orders does not buy on the currency pair on which it is necessary
I am looking for an answer.)
I would be very grateful)
it is like - if there are more than 0 orders, then continue the algorithm (as if there are bought or 0 - if there are zero, then why do the algorithm)
it is like - if there are more than 0 orders, then continue the algorithm (as if there are bought or 0 - if there are zero, then why do the algorithm)
If you use this algorithm in your programs, remove it
and see what happens.
Dudes who can help this time? - I wrote a code - I got a weird one - I need the price to go from the top to the bottom to the moving average and buy (like a bounce) - if you know the right code, please let me know)))
CodeBase has a bunch of Expert Advisors and I think there's one with your algorithm that you can remake for yourself.