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

[amibroker] Re: Applystop StopLoss - trade on next day OPEN when PREVIOUS day CLOSE



PureBytes Links

Trading Reference Links

Unfortunately, this is not possible in AFL I am afraid. I tried the 
following but does not work either because sometimes it gives wrong 
signals. 

Sell=C<(1-StopLoss/100)*ValueWhen(Buy,Ref(O,1),1)

I wonder if anybody managed to build proper trading system based on 
EOD data in Amibroker, which can be used in real trading. If your 
indicators are based on Close then you have to trade on next day 
Open, in which case you need to use Settradedelays and you are 
immediately dead as AFL does not support this. If you want to use 
combined StopLoss and Profittarget exits together, it does not work. 
If you want to use combined Trailing stop and PT exits, it does not 
work.  You can find couple of useless examples in AFL Function 
Reference under ApplyStop, which has nothing to do with real trading.

I am really disappointed with Amibroker and AFL. I have been 
programming it for 2 years so I know what I am talking about. You 
cannot find out what the reason of the bad exit signals are. It is 
like a black box.


--- In amibroker@xxxxxxxxxxxxxxx, "zozuzoza" <zozuka@xxx> wrote:
>
> Hi,
> 
> I would like to apply a stoploss on next day OPEN when PREVIOUS day
> CLOSE hits stop and Sellprice=Open. In the AFL library, I could only
> find the solution for
> "Scenario 3:
> you trade on next day OPEN and want to exit by stop on OPEN price
> when PREVIOUS day H-L range hits stop"
> 
> This is almost good for me except I want the Applystop function to
> check the PREVIOUS day Close instead of the H-L range.
> 
> The settings I would like to use is as follows.
> SetOption("AllowSameBarExit",1);
> SetOption( "ActivateStopsImmediately", 1);
> SetTradeDelays( 1, 1, 1, 1 );
> BuyPrice=O;
> SellPrice=O;
> 
> I am stucked. Could anybody help me please how I can do it.
> 
> Thank you.
>



------------------------------------

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

*********************
TO GET TECHNICAL 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

*********************************
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/