Post an expert advisor that skip symbols that are already opened. Thus it should only open one position of a particular symbol. This is to avoid opening many position is the same symbol. I have been trying do that for the longest time. I have failed up to so far. i am trying to skip symbols that already have positions in a multi_symbol expect advisor. Here is my code.
//SymbolArray is the array of symbols being looped int osell; for(int i = OrdersTotal() - 1; i >= 0; i--) // returns the number of current positions { if(OrderSelect(SymbolArray[i])) { continue; } else { osell = OrderSend(_Symbol, OP_SELLSTOP, 0.01, Bid, 3, 0, Bid-TKPM*spread_points*_Point, "basicTrigger", 16384, 0, clrAqua); } }
Ungwegwebula #:
Post an expert advisor that skip symbols that are already opened. Thus it should only open one position of a particular symbol. This is to avoid opening many position is the same symbol. I have been trying do that for the longest time. I have failed up to so far. i am trying to skip symbols that already have positions in a multi_symbol expect advisor. Here is my code.
Hello. I just saw your comment. As soon as I can and have some time, I will post a solution for you, all right?
Post an expert advisor that skip symbols that are already opened. Thus it should only open one position of a particular symbol. This is to avoid opening many position is the same symbol. I have been trying do that for the longest time. I have failed up to so far. i am trying to skip symbols that already have positions in a multi_symbol expect advisor. Here is my code.

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
Code for counting open orders by Order Type individually:
This is an Expert Advisor code for counting open running orders for each type: OP_BUY or OP_SELL.
Author: Francisco Rayol