I want my EA to do Only Process GBPUSD Pair instead of all Pair

 

i used _symbol or Symbol() function in my code. i want only GBPUSD trades.  The problem is that when i upload my EA on a VPS it works for all pair. am i right?  if it works for all then what is the way that my robot only trade on gbpusd.  


my code example:

Ask=NormalizeDouble(SymbolInfoDouble(_Symbol, SYMBOL_ASK), _Digits);
    Bid=NormalizeDouble(SymbolInfoDouble(_Symbol, SYMBOL_BID), _Digits);

   double MyRSIPriceArray[];
   int MyRSIDefinition=iRSI(_Symbol, PERIOD_H1, 14, PRICE_CLOSE);
   CopyBuffer(MyRSIDefinition, 0, 0, 3, MyRSIPriceArray);
   ArraySetAsSeries(MyRSIPriceArray, true);
   MyRSIValue=NormalizeDouble(MyRSIPriceArray[0], 2);
   
   double MyRSI2PriceArray[];
   int MyRSI2Definition=iRSI(_Symbol, PERIOD_M30, 14, PRICE_CLOSE);
   CopyBuffer(MyRSI2Definition, 0, 0, 3, MyRSI2PriceArray);
   ArraySetAsSeries(MyRSI2PriceArray, true);
   MyRSI2Value=NormalizeDouble(MyRSI2PriceArray[0], 2);

 

Forum on trading, automated trading systems and testing trading strategies

When you post code please use the CODE button (Alt-S)!

Use the CODE button


 
  1. Please edit your (original) post and use the CODE button (Alt-S)! (For large amounts of code, attach it.)
              General rules and best pratices of the Forum. - General - MQL5 programming forum (2019)
              Messages Editor

  2. Mohsin Dastgeer: The problem is that when i upload my EA on a VPS it works for all pair. am i right? 
    Wrong. Your posted code only trades the chart's symbol.