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

Re: [amibroker] Re: IB vs AA trading ( was Can anyone help me Sort this out....)



PureBytes Links

Trading Reference Links




Further to my earlier post copied down below I tried to code the 
daily VWAP prices for RT data but  i am getting some results but it 
"doesn't look" good. For example I cannot imagine how a VWAP price can be 
outside the daily high and low... comments invited on what could be wrong with 
my code. See definition of VWAY below.EndOfDay = TimeNum() == 
160000;StartOfDay = TimeNum() == 093000;TradingHours = TimeNum() >= 
093000AND TimeNum() <= 160000;
DailyMF = 
ValueWhen(EndOfDay,Sum(V*(H+L)/2,390));       // 
calculate daily price*volumeDailyVol = 
ValueWhen(EndOfDay,Sum(V,390));                       
// calculate daily volumeVWAP = 
DailyMF/DailyVol;                                                         
// VWAP
<FONT 
size=2>Plot(IIf(TradingHours,VWAP,Null),"VWAP",2,1);Plot(C,"",1,64);Plot(StartOfDay,"StartOfDay",5,2|styleOwnScale);Plot(EndOfDay,"EndOfDay",4,2|styleOwnScale);Plot(NOT 
TradingHours,"ExtHours",0,styleArea|styleOwnScale);Thanks,Herman.



Hello,Has anybody written a VWAP formula for RT data? I would be 
happy with a minute approximation."...The VWAP for a stock is calculated by 
adding the dollars traded for every transaction in that stock ("price" x "number 
of shares traded") and dividing the total shares traded.A VWAP is 
computed from the open of the market to the market close, and is calculated by 
volume weighting all transactions during this time period."[ <A 
href="" 
target=_blank>http://interactivebrokers.com/html/tradingInfo/orders/vwapOrders.html 
]Thanks,hermanSend BUG REPORTS to 
bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
suggest@xxxxxxxxxxxxx-----------------------------------------Post 
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx(Web page: <A 
href="" 
target=_blank>http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
group FAQ at: <A 
href="" 
target=_blank>http://groups.yahoo.com/group/amibroker/files/groupfaq.htmlYahoo! 
Groups LinksTo visit your group on the web, go to:<A 
href="" 
target=_blank>http://groups.yahoo.com/group/amibroker/To unsubscribe 
from this group, send an email 
to:amibroker-unsubscribe@xxxxxxxxxxxxxxxYour use of Yahoo! Groups is 
subject to the Yahoo! Terms of Service. 


Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html








Yahoo! Groups Sponsor


ADVERTISEMENT




Click Here















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:amibroker-unsubscribe@xxxxxxxxxxxxxxx 
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.