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

[amibroker] Saving bid/ask information from eSignal to Ami database



PureBytes Links

Trading Reference Links

I am trying to get Amibroker Professional 5.0 while running eSignal 
to save bid/ask information on 5-second bars to a "dummy" ticker 
using ATC.  What I have written below seems to write (and plot) a 
cumulative number to a dummy ticker called ~QQQQBid that relates to 
each sequential bid and ask that is retrieved using GetRTData, rather 
than a unique number that gets stored each 5-second interval.  Can 
anyone suggest what flags I might put in AddToComposite to prevent 
this accumulation, or suggest another way altogether that does not 
use ATC?  Thank you very much.



bid = GetRTData("bid");
ask = GetRTData("ask");
spread = ask-bid;
bidsize = GetRTData("bidsize");
asksize = GetRTData("asksize");
//Plot(bidsize,"bidsize",colorRed,styleLine|styleOwnScale);
//Plot(spread,"spread",colorGreen,styleLine|styleOwnScale);
Plot(bid,"bid",colorBlue,styleLine);
Plot(ask,"ask",colorBlue,styleLine);
PlotOHLC(O,H,L,C,"ohlc",colorBlack,styleCandle);
Buy=Sell=Cover=Short=1;
Filter=1;

if(Name()=="QQQQ")
{
AddToComposite
(bid,"~QQQQBid","O",atcFlagCompositeGroup|atcFlagEnableInIndicator);
PlotForeign("~qqqqask","~qqqqask",colorRed,styleLine);
AddToComposite
(ask,"~QQQQAsk","O",atcFlagCompositeGroup|atcFlagEnableInIndicator);
PlotForeign("~qqqqask","~qqqqask",colorRed,styleLine);

AddToComposite
(bidsize,"~QQQQBidsize","O",atcFlagCompositeGroup|atcFlagEnableInIndic
ator);
PlotForeign("~qqqqasksize","~qqqqasksize",colorRed,styleLine);
AddToComposite
(asksize,"~QQQQAsksize","O",atcFlagCompositeGroup|atcFlagEnableInIndic
ator);
PlotForeign("~qqqqask","~qqqqasksize",colorRed,styleLine);

}





Please note that this group is for discussion between users only.

To get 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/