How do I check through all already opened price?
I tried the following, but does not work.
if (condition).....
for(bcnt=btotal-1; bcnt >= 0; bcnt--)
{
OrderSelect(bcnt, SELECT_BY_POS, MODE_TRADES);
if(OrderType()<=OP_SELL && OrderSymbol()==Symbol())
{
if(OrderType()==OP_BUY)
{
if( (Ask > OrderOpenPrice() + (Point*OrderDist)) || (Ask < OrderOpenPrice() - (Point*OrderDist)) )
{
Buy();
......
//------------------------------
I tried the following, but does not work.
if (condition).....
for(bcnt=btotal-1; bcnt >= 0; bcnt--)
{
OrderSelect(bcnt, SELECT_BY_POS, MODE_TRADES);
if(OrderType()<=OP_SELL && OrderSymbol()==Symbol())
{
if(OrderType()==OP_BUY)
{
if( (Ask > OrderOpenPrice() + (Point*OrderDist)) || (Ask < OrderOpenPrice() - (Point*OrderDist)) )
{
Buy();
......
//------------------------------