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

[amibroker] AddtoComposite VS Plot



PureBytes Links

Trading Reference Links

Can someone explain the difference I see in these two charts. Essentially, the upper uses add to composite function while the lower uses the plot function. Meanwhile the basic AFL function is exactly the same. (the values for Addtocomposite is about 7 times the values of the one from the plot function).
 
The formulas are:
 
(1) Addtocomposite
 

Result_Open = Foreign("USDJPY","O") * Foreign("GBPUSD" ,"O");

Result_Close = Foreign("USDJPY","C") * Foreign("GBPUSD" ,"C");

Result_High = Foreign("USDJPY","H") * Foreign("GBPUSD" ,"H");

Result_Low = Foreign("USDJPY" ,"L") * Foreign("GBPUSD" ,"L");

 

AddToComposite( Result_Open, "~GBPJPY", "O");

AddToComposite( Result_Close, "~GBPJPY", "C");

AddToComposite( Result_High, "~GBPJPY", "H");

AddToComposite( Result_Low, "~GBPJPY", "L");

Buy = 0; 

 
(2) Using the plot function
 

Result_Open = Foreign("GBPUSD" ,"O") * Foreign("USDJPY" ,"O");

Plot(Result_Open,"GBPJPY", colorRed);

Result_Close = Foreign("USDJPY","C") * Foreign("GBPUSD" ,"C");

Plot( Result_Close, "GBPJPY", colorBlack);

Result_High = Foreign("USDJPY","H") * Foreign("GBPUSD" ,"H");

Plot( Result_High, "GBPJPY", colorBlue);

Result_Low = Foreign("USDJPY" ,"L") * Foreign("GBPUSD" ,"L");

Plot( Result_Low, "GBPJPY", colorGreen );

 
 
Attached are the results on my computer.
 
 


Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. __._,_.___

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




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Attachment: Description: image/vnd.ms-modi