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

Re: [amibroker] Order of Signals in CBT


  • Date: Wed, 27 Jan 2010 15:20:53 -0800 (PST)
  • From: B S <bs2167@xxxxxxxxx>
  • Subject: Re: [amibroker] Order of Signals in CBT

PureBytes Links

Trading Reference Links



Thanks Tomasz - I somehow missed this yesterday.  My intended question was a bit more detailed as I will explain below:
 
In the low-level backtester as I loop through entry signals, I consider certain risk metrics that are calculated based on current open positions (across all symbols) when deciding whether or not to enter a new trade.  Therefore, if i have an entry signal that would open a position at the bar's close, I would need to have risk metrics that were updated to reflect any positions closed earlier during that same bar (but for obvious practical reasons, not those exited at the bar's close).  So the sequence of the various entry and exit signals for a given bar are of key importance - three classifications would be "at bar open", "mid-bar", and "at bar close".  With that information, I could simply process them as shown below, with the only potential errors occurring around entry vs. exit mid-bar sequences (but will treat these instances conservatively and assume that mid-bar entry signals always occur before mid-bar exits).   
 
I'm sure that this isn't the first time this has been considered but the only things I can find that are somewhat related are 'timeinsidebar' for UpdateStats (doesn't seem to fit) and the 'Settings - Allow Same Bar Exit' (however it is not clear how intrabar sequence is considered there, if at all).  If anyone else has ideas on this, would appreciate hearing them.  Thanks, B
 
Processing Order
1. "At Open" Entries
2. "At Open" Exits
3. "Mid-Bar" Entries
4. "Mid-Bar" Exits
5. "At Close" Entries
6. "At Close" Exits


From: Tomasz Janeczko <groups@xxxxxxxxxxxxx>
To: amibroker@xxxxxxxxxxxxxxx
Sent: Tue, January 26, 2010 3:12:42 PM
Subject: Re: [amibroker] Order of Signals in CBT

 

Hello,

Signals are SORTED according to absolute value of user defined
position score http://www.amibroke r.com/guide/ h_portfolio. html


Best regards,
Tomasz Janeczko
amibroker.com

On 2010-01-26 20:54, B S wrote:



Quick question on low level processing in the CBT.  At a given bar, what is the default order that signals are presented in a loop such as:
 

for (sig = bo.GetFirstSignal( i); sig; sig = bo.GetNextSignal( i))

 

Is it alphabetical by symbol?  Exit signals first?  Something else?

 

Thanks.







__._,_.___


**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/





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

__,_._,___