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

Re: [amibroker] Restriction on buyprice/sellprice being foreign



PureBytes Links

Trading Reference Links

Hello,

You should do the other way round: set current symbol to symbol A,
and use SetForeign() to switch to instrument B for calculations of your signal.

Yes there is a price bound checking as described in the user's guide:
http://www.amibroker.com/guide/h_backtest.html
(it can be turned off using SetOption, but as I wrote above better
way is to do the other way round)

Best regards,
Tomasz Janeczko
amibroker.com
  ----- Original Message ----- 
  From: giggollo99 
  To: amibroker@xxxxxxxxxxxxxxx 
  Sent: Tuesday, June 06, 2006 5:35 PM
  Subject: [amibroker] Restriction on buyprice/sellprice being foreign


  Hi,

  Im trying to simulate trading instrument A based on the price action 
  of instrument B. To do this, i write all the code normally for 
  instrument B, then i just set the 
  buyprice/sellprice/shortprice/coverprice arrays to the prices of 
  symbol A. However, the backtest gives prices based on symbol A's data 
  even though im setting the buyprice/sellprice/shortprice/coverprice to 
  FOREIGN function.

  Is there any restriction on buyprice/sellprice/shortprice/coverprice 
  being set to a FOREIGN function?