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

[amibroker] Sellprice/Applystop problem



PureBytes Links

Trading Reference Links

I forgot to add that I am aware of, but don't understand, TJ's note in the
Equity section of the User's Guide:

<clip>
When your formula uses Equity(1) you should avoid using built?in delays.
Here is a story why: Only BACKTESTER implements delays while EXPOLORATION
and other modes do NOT. Therefore Equity(1) must not delay signals by
itself. However in order to perform equity calculations delays must be
applied to match backtester output, so AmiBroker when it encounters
Equity(1) applies the delays (even in exploration, indicator, etc) but just
before end of the equity call AmiBroker must ADJUST BACK the signals, so
Equity?adjusted buy/sell/short/cover arrays do NOT have delay applied. This
involves shifting updated bars back and this may cause problem if signal
occurs on the very last bar (because it is moved by delay outside the
range).

To disable this shifting back in exploration (so exploration matches the
output of backtester with NON?ZERO delays) you need to use Equity( 2 )

On the other hand using Equity(2) in backtest formula causes double
delay.(one added by the equity function, second added by the backtester
pass).

Built?in delays are designed to be used in BACKTESTER ONLY. The intention is
as follows: set non zero delays in the settings...
now SINGLE formula can be used to BACKTEST and to get TODAY SIGNALS for
trading for tommorrow (in SCAN) mode.
Solution 1:
Embbed delays in the AFL code itself:
Buy = Ref( Buy, ?1 );
Sell = Ref( Sell, ?1 );
Solution 2:
When using Equity AND EXPLORATION
Use EQUITY( 2 ) but except of backtest mode
if( Status("action") != 5 ) e = Equity( 2 );

<clip>

Can anyone paraphrase this or provide code that illustrates 'delay', 'double
delay', 'updated signals', and 'original positions'?

And shouldn't 'delays set in preferences' be 'delays set in Settings'?

thanks again,

-john

----- Original Message ----- 
From: john gibb
To: amibroker@xxxxxxxxxxxxxxx
Sent: Saturday, May 22, 2004 8:32 AM
Subject: [amibroker] Equity(2) questions


Hi,

For Equity(2), what does 'updated signals are not moved back to their
original positions' mean in:

    'updated signals are not moved back to their original positions if
buy/sell/short/cover delays set in preferences are non-zero'

?

And when is it appropriate to use Equity(2)?

thanks,

-john


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






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.




------------------------ Yahoo! Groups Sponsor ---------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
---------------------------------------------------------------------~->

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 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:
     http://docs.yahoo.com/info/terms/