[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Re: AB with IB connection



PureBytes Links

Trading Reference Links

Hello,

Everything is fine as long as your formulas do not take
too much time to execute. If you formulas for example take more than
one second to execute then obviously setting any chart refresh lower
than 1sec would result in 100% CPU usage.

All formulas that ship with AmiBroker take less than 0.05 sec.

And no it is not hard to troubleshoot - all you need to do is to go
to Tools->Preferences, "MIscellaneous" and display chart timing there.
Take a look at the time it takes to execute your formula
and once you find which one is taking most you need to go
to Formula Editor and choose Tools->Check and Profile

It will display what functions that you have used take the most time.

The most common user coding error is calling the same function
inside the loop while it can be called OUTSIDE loop.

That is FUNDAMENTAL point to improve you coding:
move ALL invariants outside the loop and avoid code duplicates.

Sorry to say, but most of the AFL codes floating around are terribly written
and by just avoiding duplicate calls you can make them orders of magnitude faster.

The profiler tool inside AFL code editor can easily show you how many
times given funciton is called and how much time it takes.

Again, any formula that you use for real time trading need to execute in fraction of the second:
preferrably below 0.1 sec.
If it is not the case - you need to fix the formula.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: "Jerry Gress" <pleasenospamplease@xxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Wednesday, February 04, 2009 9:33 PM
Subject: RE: [amibroker] Re: AB with IB connection


> Hello,
> 
> Yes I have had this problem more than once. One time if I changed realtime
> refresh rate from zero to one, the chart would start working again. The next
> time no. Another time I would wait and the chart would start working again,
> and paint in the (I assume) missing bars. The last time I checked the CPU
> usage which was below 50%, it hanged so long I could set up the screen
> recorder to take a video. On this last hangup (long) I had a second (slower)
> computer running with the same chart (formulas) and it was working
> perfectly. All the above with good (green bar) internet connections.
> 
> So hard to say and hard to trouble shoot. If nobody else gets these results
> then I think its time we both get new computers!!!!! Heard on a different
> forum NT is rock solid with dual-quad core computers. 
> 
> 
> Regards,
> 
> 
> 
> Jerry Gress
> Stockton, Ca.
> 
> -----Original Message-----
> From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf
> Of murthysuresh
> Sent: Wednesday, February 04, 2009 10:50 AM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Re: AB with IB connection
> 
> realtime chart refresh =1 sec
> cpu=normal. i dont recollect now but i believe it was normal<50%. but 
> this morning, i definitely did not have cpu spikes. in the past  i 
> have had issues wiht cpu spikes and its impact on AB before, and i 
> know how it feels.
> 1 more reason that makes me narrow it to AB is that i had ISP issues 
> this morning. NT could recover automaticlly and not AB.
> 
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "Jerry Gress" 
> <pleasenospamplease@xxx> wrote:
>>
>> Hello,
>> 
>> Quick questions what is your realtime chart refresh interval set 
> to? And
>> what was your Windows Task Manager CPU usage showing?
>> 
>> Regards,
>> 
>> Jerry Gress
>> Stockton, Ca.
>> 
>> -----Original Message-----
>> From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] 
> On Behalf
>> Of murthysuresh
>> Sent: Wednesday, February 04, 2009 9:03 AM
>> To: amibroker@xxxxxxxxxxxxxxx
>> Subject: [amibroker] AB with IB connection
>> 
>> i use both both products. Ninja and AB. I use NInja for trading and 
>> AB for charting both connecting to IB data for Forex.
>> This morning, i kept getting a  TWS pop up windows for a bit of 
> time. 
>> i could see that during that period AB chart was not getting 
>> refreshed.
>> however teh NT was running stable. I had been running a live Ninja 
>> strategy and i could see the newer data getting refreshed 
> constantly 
>> on my monitors.
>> 
>> I cannot state with any proof that AB was losing connectivity with 
> IB 
>> but there was enough circumstantial evidence to back it. The AB 
> chart 
>> was not getting refreshed during that time. 
>> 
>> having worked with a c# based api for tws, i do realise that i have 
>> to resubscribed to events from IB after it gets disconnected and 
>> reconncted. i am not proposing any solutions here but i do believe 
>> that there is some room within AB's TWS connector. 
>> 
>> finally. this thread is posted here and not sent to AB support 
>> because if there are users who can add contextual feedback, it 
> could 
>> add value to AB. It is not meant to be critical of Amibroker not of 
>> TJ efforts to make it an excellant product.
>> 
>> 
>> 
>> 
>> ------------------------------------
>> 
>> **** IMPORTANT ****
>> This group is for the discussion between users only.
>> This is *NOT* technical support channel.
>> 
>> *********************
>> TO GET TECHNICAL SUPPORT from AmiBroker please send an e-mail 
> directly to 
>> SUPPORT {at} amibroker.com
>> *********************
>> 
>> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
>> http://www.amibroker.com/devlog/
>> 
>> For other support material please check also:
>> http://www.amibroker.com/support.html
>> 
>> *********************************
>> Yahoo! Groups Links
>>
> 
> 
> 
> ------------------------------------
> 
> **** IMPORTANT ****
> This group is for the discussion between users only.
> This is *NOT* technical support channel.
> 
> *********************
> TO GET TECHNICAL SUPPORT from AmiBroker please send an e-mail directly to 
> SUPPORT {at} amibroker.com
> *********************
> 
> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
> 
> For other support material please check also:
> http://www.amibroker.com/support.html
> 
> *********************************
> Yahoo! Groups Links
> 
> 
> 
> 
> 
> ------------------------------------
> 
> **** IMPORTANT ****
> This group is for the discussion between users only.
> This is *NOT* technical support channel.
> 
> *********************
> TO GET TECHNICAL SUPPORT from AmiBroker please send an e-mail directly to 
> SUPPORT {at} amibroker.com
> *********************
> 
> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
> 
> For other support material please check also:
> http://www.amibroker.com/support.html
> 
> *********************************
> Yahoo! Groups Links
> 
> 
> 


------------------------------------

**** IMPORTANT ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

*********************
TO GET TECHNICAL SUPPORT from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com
*********************

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html

*********************************
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/