Hey guys need help with buttons and symbols.

 

Hello guys i am trying to make a trade bot both with auto and manual trading but for some reason every time i use OOP or even with the new controls i seem to fail so i am asking any body who can help me please for the love of god lol...

I want to place 25 buttons on a panel that when clicked change the chart to the symbol on the button such as EURUSD please can some one help with this please.

I need for some one to show me how to make this a next and prev routines please.

Never mind worked it out my self .

   string PAIRS[25]=
     {
      "AUDUSD","GBPUSD","EURUSD","USDCAD","USDCHF","USDJPY","NZDUSD","USDSEK","USDHKD","USDMXN",
      "USDZAR","USDTRY","GBPAUD","AUDCAD","CADCHF","EURAUD","GBPCHF","GBPJPY","NZDJPY","AUDJPY",
      "EURJPY","EURCHF","EURGBP","AUDCHF","CHFJPY"
     };
      
      OnChartEvent
       

if(id==CHARTEVENT_OBJECT_CLICK && sparam=="btn2") ChartSetSymbolPeriod(0,pairs[1],_Period);

 
Albert Poulis: it is still not working:
  1. "Doesn't work" is meaningless - just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires - meaningless. There are no mind readers here.
  2. Don't post stuff that won't compile, (last line.) The other two are essentially identical. What you posted is meaningless without the rest. We have no idea wether you have a object btn9, wether your code is in the event manager, etc.
  3. Print out your variables, and find out why.
Reason: