Search found 11 matches

by pietrop
Wed Apr 04, 2018 3:26 pm
Forum: Twslink - universal Interactive Brokers API plugin
Topic: Automatic report with SET_HTML_REPORT
Replies: 0
Views: 23298

Automatic report with SET_HTML_REPORT

Hello all, I'm trying to setup an automatic report through the API but I don't seem to receive it, neither by FTP nor Email. Is there any way to debug the process? I'm using the following code: void testIbReport() { int res = 0; res = CREATE_FTP_CFG("myftp.cfg","192.168.12.113",21,"ftpuser","mypassw...
by pietrop
Wed Apr 04, 2018 10:32 am
Forum: Twslink - universal Interactive Brokers API plugin
Topic: Set event handler callback for MetaTrader 5
Replies: 18
Views: 25190

Re: Set event handler callback for MetaTrader 5

I've managed to install after rebooting. But unfortunately it's the same as before. I get the events but with all meaningless fields: 2018.04.04 12:31:09.288 ZetaEA (GBPCHF,M1) Event Uid=405, allVals=enf 2018.04.04 12:31:09.290 ZetaEA (GBPCHF,M1) Inside ibEventHandler: 2147483646,2147483646,21474836...
by pietrop
Tue Apr 03, 2018 12:00 pm
Forum: Twslink - universal Interactive Brokers API plugin
Topic: Set event handler callback for MetaTrader 5
Replies: 18
Views: 25190

Re: Set event handler callback for MetaTrader 5

I'm trying to install it on Ubuntu WINE but I get the error in attachment.
Shall I delete the old file manually?
by pietrop
Mon Mar 26, 2018 11:51 am
Forum: Twslink - universal Interactive Brokers API plugin
Topic: Set event handler callback for MetaTrader 5
Replies: 18
Views: 25190

Re: Set event handler callback for MetaTrader 5

You mean TWSlink, MT or IB Gateway/TWS logfiles?
by pietrop
Fri Mar 23, 2018 2:20 pm
Forum: Twslink - universal Interactive Brokers API plugin
Topic: Set event handler callback for MetaTrader 5
Replies: 18
Views: 25190

Re: Set event handler callback for MetaTrader 5

Before I was in WINE on Ubuntu, now I'm testing on Windows 10 in VirtualBox. In this configuration I can get the events uid without registering the handler, but their fields are always "enf". EDIT But if I no longer need to set the event handler (and thus provide the event subscription category bitm...
by pietrop
Fri Mar 23, 2018 9:08 am
Forum: Twslink - universal Interactive Brokers API plugin
Topic: Set event handler callback for MetaTrader 5
Replies: 18
Views: 25190

Re: Set event handler callback for MetaTrader 5

Unfortunately I've tested your code and it doesn't work, as I've described in my previous post. As I've mentioned before, I had seen from this doc: twslink2/Documentation/html/fct_SET_EVENT_HANDLER.html that you need to set the callback to 0 to get the events in active mode: Comments If #1 is 0 but ...
by pietrop
Thu Mar 22, 2018 4:41 pm
Forum: Twslink - universal Interactive Brokers API plugin
Topic: Set event handler callback for MetaTrader 5
Replies: 18
Views: 25190

Re: Set event handler callback for MetaTrader 5

@boad_admin
With your latest code I don't even get the event uids > 0.
If I use SET_EVENT_HANDLER( 0, 1, 0 ), I get the events uid but with the uninitialized event fields ("enf", etc.).
by pietrop
Thu Mar 22, 2018 11:39 am
Forum: Twslink - universal Interactive Brokers API plugin
Topic: Set event handler callback for MetaTrader 5
Replies: 18
Views: 25190

Re: Set event handler callback for MetaTrader 5

@board_admin I've tested your code, but I get the compilation errors: '(void*)' - invalid cast operation '(void*)' - invalid cast operation at the line: void* cbl = (void*) cb; and: '(long)' - invalid cast operation at the line: res = SET_EVENT_HANDLER( (long) cbl, 1, 0 ); According to the doc, thou...
by pietrop
Thu Mar 22, 2018 11:17 am
Forum: Twslink - universal Interactive Brokers API plugin
Topic: Set event handler callback for MetaTrader 5
Replies: 18
Views: 25190

Re: Set event handler callback for MetaTrader 5

Thanks, I've looked into the active event handling and I've tested the following code: void ibEventHandler( int integer1, // carries always main category of event int integer2, // can have specific meaning, in particular when integer1=2 int integer3, // carries any value int integer4, // carries any...
by pietrop
Wed Mar 21, 2018 4:38 pm
Forum: Twslink - universal Interactive Brokers API plugin
Topic: Set event handler callback for MetaTrader 5
Replies: 18
Views: 25190

Set event handler callback for MetaTrader 5

Hello all, I need a working example for the SET_EVENT_HANDLER function in MT5: $TRADE_COMMANDER_HOME/twslink2/Documentation/html/fct_SET_EVENT_HANDLER.html The given example: ret = SET_EVENT_HANDLER(ProcessTWSEvents,17,0) works only for C# or the likes, i guess. In MT5 I can't convert the address of...