Market Watch Trading All Pair through E A

 

Hi 


I want my robot to trade all pairs in the market watch window, I do write this program, but it dont trade at all, can guys please help, where i am gone wrong





 
Line 37.
 
if (TradingHours() && sell==true) //2147483647    
            {  
            
           
           ticket=OrderSend(Symbols(),OP_SELL,GetLots(OP_SELL),Bid,Slippage,0,0,comm,MagicID,0,clrGreen);
         
            if (ticket < 0) Print("Order Failed with "+ GetLastError());
            }


string Symbols()
{
    string sSymbol;
    int iCount=SymbolsTotal(false); // true, the function returns the number of symbols selected in MarketWatch. If the value is false, it returns the total number of all symbols.
    Print("Symbols Count: ", iCount);
    int i;
    for(i=0; i<iCount; i++)
       {
       string sSymbol=SymbolName(i, false);// true, the symbol is taken from the list of symbols selected in MarketWatch. If the value is false, the symbol is taken from the general list.
       // string desc=SymbolInfoString(sSymbol, SYMBOL_DESCRIPTION);
       }
   return(sSymbol);
}


But this ea is not trading on all pairs on market watch window, can you help me
 
Incomplete code no declaration of Bid variable.
 
Marco vd Heijden:
Incomplete code no declaration of Bid variable.

i dont understand, can you be more specific.


I want to read all pairs on the market watch, and place orders if the condition met

 
It's not Bid. You must use the data of the selected symbol not that of the symbol of the EA hosting card
 

You want to trade allsymbols but you are using just the Bid price of the chart symbol to do that.

You can not buy GBPJPY at EURUSD Bid price.

Use 

MarketInfo(Symbols(),MODE_BID);
 

after changing that also i face the same issue, it is ordering only on the chart it is attached, i dont think it is reading the market watch

<File Deleted>
 
What happened the file has been deleted
 
Comments that do not relate to this topic, have been moved to "Unable to add my advisor to the Market".
Reason: