PureBytes Links
Trading Reference Links
|
This was answered some time ago, check post histories
I believe it is
1. PositionScore value, higher absolute value goes first (+ for long,
- for short)
2. Higher trade size, larger $ value goes first
3. Symbol alphabetic, A goes first
--
Cheers
Graham Kav
AFL Writing Service
http://www.aflwriting.com
2009/3/16 Mike <sfclimbers@xxxxxxxxx>:
> 1. Yes, I believe that in the absence of a PositionScore, it's first come first served. I'm not 100% sure though.
>
> The absolute value of PositionScore is used when choosing the winners, since negative PositionScores are for Short and positive ones are for Buy. The usage of PositionScore depends on a few other variables as discussed in the MaxOpenLong, MaxOpenShort, SeparateLongShortRank options
>
> http://www.amibroker.com/guide/afl/setoption.html
>
> Yes, any formula can be used to calculate the PositionScore array.
>
> 2. Maybe. Give it a try. If it doesn't work, you can try changing the external code to be wrapped as functions. Then, #include both and call the relevant function based on the Dummy value.
>
> e.g.
> System1.afl
> procedure System1() {
> Buy = ...
> Sell = ...
> }
>
> System2.afl
> procedure System2() {
> Buy = ...
> Sell = ...
> }
>
> Dummy.afl
> Buy = Sell = 0;
> Dummy = Optimize("System", 1, 1, 2, 1);
>
> if (Dummy == 1) {
> System1();
> } else if (Dummy == 2) {
> System2();
> }
>
> Mike
>
> --- In amibroker@xxxxxxxxxxxxxxx, Radek Simcik <radek.simcik@xxx> wrote:
>>
>> Hi Mike,
>>
>> thank you for your answers... Some more questions below.
>>
>> Radek
>>
>> On Mon, Mar 16, 2009 at 3:13 PM, Mike <sfclimbers@xxx> wrote:
>> > 1. Use PositionScore.
>> > http://www.amibroker.com/guide/h_portfolio.html
>>
>> cool but
>> - It doesn't say how AB handles it without using PositionScore (just
>> out of my curiosity). Unless I am correct saying that whatever comes
>> first is taken
>> - is my understanding correct that
>> -----PositionScore stores a number and if there are let's say 5 buy
>> signals but 3 MaxOpenPosition then AB takes 3 trades with 3 highes
>> PositionScore number?
>> ----- I can use any kind of formula to calculate PositionScore?
>>
>> > 2. Run a dummy optimization.
>> Do you think that it would work if I use #include <system1.afl> for Dummy ==1
>> #include
>> <system2.afl> for Dummy ==2
>>
>> so I do not have to copy a and paste the systems and create new one
>> for this dummy optimization?
>>
>>
>> >
>> > Buy = Sell = 0;
>> > Dummy = Optimize("System", 1, 1, 2, 1);
>> >
>> > if (Dummy == 1) {
>> > // Strategy 1
>> > Buy = ...
>> > Sell = ...
>> > }
>> > if (Dummy == 2) {
>> > // Strategy 2
>> > Buy = ...
>> > Sell = ...
>> > }
>> >
>> > Alternatively, just run them all one after the other, then open the Report
>> > manager (drop list button from AA window), and sort by date column to see
>> > their results.
>> >
>> > Mike
>> >
>> > --- In amibroker@xxxxxxxxxxxxxxx, Radek Simcik <radek.simcik@> wrote:
>> >>
>> >> Hi all,
>> >>
>> >> I was just wondering if anybody knows
>> >>
>> >> - how AB decides what trade to take in case there are let's say 5 possible
>> >> trades but we have set up "MaxOpenPositions" to 3.
>> >> - how to backtest two or more different systems/afl codes against each
>> >> other
>> >> in one go. So I can see the results on one screen.
>> >>
>> >> Thank you,
>> >>
>> >> Radek
>> >>
>> >
>> >
>>
>
>
>
>
> ------------------------------------
>
> **** 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/
>
> Yahoo! Groups Links
>
>
>
>
------------------------------------
**** 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/
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:amibroker-digest@xxxxxxxxxxxxxxx
mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|