HI All,

Trying to do a homemade Premium using IB. Prem ($PREM.X, $PREM) is the
difference between futures and the spot index; the Tradestation symbol is
$esinx. Good source is www.indexarb.com. To plot the difference between two
symbols AB Support said to use the Foreign function but how to you plot a
bar graph with the result? 

The problem with my attempt (below) is sometimes on a bar chart the
open/close is above or below the high low bar for that time period!




SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}}            Hi %g,
Lo %g,  {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));

H1=Foreign("SPX-CBOE-IND","H");
L1=Foreign("SPX-CBOE-IND","L");
O1=Foreign("SPX-CBOE-IND","O");
C1=Foreign("SPX-CBOE-IND","C");

H2=Foreign("ESU6-GLOBEX-FUT","H");
L2=Foreign("ESU6-GLOBEX-FUT","L");
O2=Foreign("ESU6-GLOBEX-FUT","O");
C2=Foreign("ESU6-GLOBEX-FUT","C");

H = H2 - H1;

L = L2 - L1;

O = O2 - O1;

C = C2 - C1;

PlotOHLC(O,H,L,C, "Program Buy Sell...   ", colorGreen,styleBar|styleThick);


Any help would be appreciated.



Jerry Gress
Stockton, Ca.




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

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

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


Reply via email to