How to fire a event to Amibroker from AFLPlugin

My AFLPlugin is the order interface for the futures dealer. How do I notify Amibroker when the futures dealer has a new data return?

You need to read the examples in the ADK - i.e. the source code included for sample plugins. There is a message WM_USER_STREAMING_UPDATE that is used for notifications. Examples show exactly what and how. Also it is described in the ADK docs. All is there.

EDIT: obviously I meant WM_USER_STREAMING_UPDATE.

1 Like

sorry , i search the adk docs , can't find any about the "WM_STREAMING_UPDATE" in the sample code and docs.

would U show me the file name , and the line number

i think meybe u meaning is the "WM_USER_STREAMING_UPDATE" message

and i find the docs is

When such message is received the plugin should send WM_USER_STREAMING_UPDATE message that will nofity AmiBroker that it should ask for quotes. I

and code is

::SendMessage( g_hAmiBrokerWnd, WM_USER_STREAMING_UPDATE, 0, 0 );

no more explanation

but it is for data plugin , my question is for afl plugin or they are same ??

AFL plugins by design consist of functions that are called by AmIBroker, not the other way round (i.e. not plugin calling AmiBroker). So obviously only data plugins send notifications. And you are mistaken that "there is no explanation". Open up ADK.html file and search for "streaming".

1 Like

"no more explanation" =>

I mean, there is no further explanation in the sample code.