Getting the price of two different symbols

TurkishTraders  

Hello, a stock has three different maturities: January 31, February 28 and March 31.

"January 31 2023" symbol = "F_AKBNK0123"

" February 28 2023" symbol = "F_AKBNK0223"

" March  31 2023" symbol = "F_AKBNK0323"

I want to do :  Get bid price F_AKBNK0123 and Get ask price F_AKBNK0323 if the two prices are equal, sell 1 F_AKBNK0123 and buy 1 F_AKBNK0323.

How can I do that? I used the example below to try it, it brings the price of that symbol to whichever symbol I throw, but it does not bring the price of the other symbol.  Thanks for your help.

void OnTick()
  {
  
   double bid = SymbolInfoDouble("F_AKBNK0123" ,SYMBOL_BID); 
   double ask = SymbolInfoDouble("F_AKBNK0323",SYMBOL_ASK);

   // Example
   
   if (bid == ask){
   Comment("Alert");
   }
  }
Fernando Carreiro  
Please provide more details. You did not provide log output or mention any errors in the logs either.
TurkishTraders  
Fernando Carreiro #:
Please provide more details. You did not provide log output or mention any errors in the logs either.
Thank you for wanting to help. The price is not coming because the transaction has not started yet. I just got it. 
Reason: