Closed fintechee closed 1 year ago
the instrument should be defined as array of symbols, for example: instrument = ["GBP/USD", "NAS100"]
add "s" to functions subscribeInstrument and unsubscribeInstrument, like: subscribeInstruments, unsubscribeInstruments
Hi Daniel,
Thank you for your answer.
Why were the codes in the first example causing the subscription to be cancelled immediately after it was subscribed? Why does the second example call “unsubscribeConnectionStatusChange” in both the connected and disconnected conditions?
Can you provide more simplified examples? Many thanks.
This sample code just shows how to subscribe and unsubscribe for array of symbols, a real program probably won't be calling both functions at the same time, each function would be triggered by something else, like user input.
Thank you for your fast response. I saw each example call “unsubscribeConnectionStatusChange” in both the connected and disconnected conditions. Is this a standard usage?
it just shows how to use listener with subscribeConnectionStatusChange, you can change the unsubscribeConnectionStatusChange() under if (status.isConnected()) to subscribeConnectionStatusChange() https://docs.gehtsoftusa.com/fclite/#IFXConnectLiteSession.html
Thank you, Daniel.
close this.
Hi FXCM team,
I hope you are doing well.
I checked https://docs.gehtsoftusa.com/fclite/ Some examples have bugs. For example: https://docs.gehtsoftusa.com/fclite/html/samples/js/get_instruments.js //subscribe to instrument instrumentsManager.subscribeInstrument(instrument); //unsubscribe to instrument instrumentsManager.unsubscribeInstrument(instrument); The "instrument" is undefined.
https://docs.gehtsoftusa.com/fclite/html/samples/js/open_position.js var CompleteLoginConnectionStatusChangeListener = /* @class / function (completeLoginResolve, loginReject, session) { this.completeLoginResolve = completeLoginResolve this.loginReject = loginReject this.session = session
};
I don't understand why both referred to by arrows call unsubscribeConnectionStatusChange.
And, each example will logout just after logging in, which makes most of them hard to understand why and how. Do you have simplified examples? It would be better if we don't need to log out immediately after logging in.
Many thanks.