Were can we find the signal id

 

Hi guys,

I am trying to get infos from my suscribed signal in my EA, but cannot find the signal ID anywere..  please help



 

Is this to what you are referring?


PS! I used your own screenschot.

 
Fernando Carreiro #:

Is this to what you are referring?


PS! I used your own screenschot.

YES. Used to get all other infos about the signal


I am talking about the signal I am currently suscribed and following ..  to retreive the infos of the signal like balance, equity, etc ..

It seems that we can only consult the signals database with these functions ..


 
Volcanbleu #: YES. Used to get all other infos about the signal. I am talking about the signal I am currently suscribed and following ..  to retreive the infos of the signal like balance, equity, etc ..

It seems that we can only consult the signals database with these functions ..

I've never subscribed to any Signal myself, so I'm not really understanding your question, but maybe the following CodeBase publication of mine may be helpful ...

Code Base

Listing all MT5 Signals' properties to a CSV file

Fernando Carreiro, 2022.04.21 15:14

This simple quick & dirty script code will output a CSV file of all the Signals' properties as reported by the MQL5 Trade Signals functionality.
 
Fernando Carreiro #:

I've never subscribed to any Signal myself, so I'm not really understanding your question, but maybe the following CodeBase publication of mine may be helpful ...

Thanks, but not much help. Aparently you can get all infos about the signal with its  INDEX in the database, but not possible to select the sucribed signal if you dont know its index in the database.

Aparently not possible to select the database signal with its "signal ID" which you can find with "GetInfoInteger". In order to get infos of the signal base, you need to SELECT it first, or I didnt find way to select it with the signal ID. Only with the INDEX (of the database).

There is INDEX and SIGNAL ID which are not the same
 
Eleni Anna Branou #

No, I think what the OP is stating, is that the ID that is returned for a subscribed signal, does not have a direct indexing into the "Base" Signals database that the platform collects and presents.

My CodeBase code collects and shows the information of those "Base" signals, and from them, one can programmatically subscribe to one via their ID.

However, if one is already subscribed (for example via the website), then it does not work in the reverse direction. The ID of a subscribed signal does not map back to the "Base" signals database.

In other words, it has nothing to do with the trades or magic number, but the Signal ID itself, regarding Documentation on MQL5: Trade Signals.

Documentation on MQL5: Trade Signals
Documentation on MQL5: Trade Signals
  • www.mql5.com
Trade Signals - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
Volcanbleu #:

Thanks, but not much help. Aparently you can get all infos about the signal with its  INDEX in the database, but not possible to select the sucribed signal if you dont know its index in the database.

Aparently not possible to select the database signal with its "signal ID" which you can find with "GetInfoInteger". In order to get infos of the signal base, you need to SELECT it first, or I didnt find way to select it with the signal ID. Only with the INDEX (of the database).

There is INDEX and SIGNAL ID which are not the same

What I can suggest, is the following, but I don't know if it will work every time.

  1. Get the Signal ID of the subscribed signal (SYMBOL_INFO_ID).
  2. Loop over all the "Base" signals and ...
    1. Read the ID of the base signal at the current index (SIGNAL_BASE_ID).
    2. Compare it to the ID of the subscribed signal.
    3. If they match, then you have found the corresponding index.
The reason I state that this may not work every time, is that the list of the "Base" signals is limited. It seems to only present the top 1000 signals, and if the subscribed signal is ranked lower it may fail to find it.
 

Here you have all Signal function with an example: https://www.mql5.com/en/docs/signals/signalbaseselect

On the left side you have all available functions

Documentation on MQL5: Trade Signals / SignalBaseSelect
Documentation on MQL5: Trade Signals / SignalBaseSelect
  • www.mql5.com
SignalBaseSelect - Trade Signals - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
Carl Schreiber #:

Here you have all Signal function with an example: https://www.mql5.com/en/docs/signals/signalbaseselect

On the left side you have all available functions

The problem is that you can get all infos on the signal from the database, but you cannot get these infos from the signal you are suscriber unless you know its INDEX number in the database. But you cannot scroll 7000 signals to find yours (the index nbre) each time you want to access the signal data..

MT5 designed the functions to look automatically all signals in the database and suscribe automatically, but cannot just follow the signal infos once you have suscribed. I am pretty sure that the index of the signal in the database is changing all the time. There should be a signal id fixed reference number and a function to get the one of your suscribed signal to be able to manage it

Reason: