AB Trailing Stop Code - Aussie Stock Forums

Results 1 to 6 of 6
  1. #1

    Default AB Trailing Stop Code

    Hi Guys,

    I only just got Amibroker on saturday. I've been looking for an indicator that plots a trailing stop loss a certain percent below. I found this thread http://www.traderji.com/metastock/43...indicator.html but cant seem to get it to work in AB. Is this possibly an old obsolete code or am I just importing it wrong? I've obviously got a lot to learn. Also can someone give me a link to a good site/forum/document so I cant get a better idea of using Amibroker itself and AFL.



  2. #2

    Default Re: AB Trailing Stop Code

    As the link suggests it is for Metastock
    You would have to re-write it for amibroker

  3. #3

    Default Re: AB Trailing Stop Code

    From memory, AB has a trailing stop built in, so you don't need specific code. Just look at the "ApplyStop" function.

    Also, AFL link:

    I know that looks bad, ... would everybody whos ever been overseas on behalf of Australia, or an Australian, agree to every photograph of them being published? John Howard

  4. #4

    Default Re: AB Trailing Stop Code

    The Amibroker support page is the best place to start.
    Has links to the online library, mailing list(s),help documentation, AFL reference guide etc.

    As with learning anything new it's better to "know less" and "understand more". Start with the basic concepts first. There is a downloadable mailing list history in the 3rd party area of Amibroker, it's probably the best resource, although searching it can be daunting.

    And there's always the helpful crew here, we'll have a go at any questions you have. I don't speak "metastock" so can't help with the trailing stop loss, can anyone else convert it to AFL ?

    The Captain

  5. #5

    Default Re: AB Trailing Stop Code

    Thanks Guys,

    Now wonder the code didn't work. I thought it looked a bit foreign compared to the others. I found it through a search on google and all the pages I'd read before were for amibroker. I guess I got myself in the mindset that that was what I was looking at. I'll have to check out those links on the weekend. Thanks for the responses. I'm sure once I get a bit more versed in the program I'll have more questions.


  6. #6

    Default Re: AB Trailing Stop Code

    Had another look at the MS code for the trailing stop and put together some AFL that looks like it will do the same job. Copy and paste into Formula Editor then click on "Apply Indicator". Will plot the trailing stop as a red line. Drag and drop a price chart on top. Can adjust lookback period and percentage stop by right clicking chart and selecting "parameters".



    Plot(sellstop,"sellstop display",colorred,styleline);


    The Captain

Similar Threads

  1. AmiBroker Plugin for Trailing Stop Plots
    By GreatPig in forum Software and Data
    Replies: 72
    Last Post: 23rd-June-2014, 02:54 PM
  2. Question for traders about stop losses?
    By Realist in forum Beginner's Lounge
    Replies: 34
    Last Post: 12th-August-2008, 01:03 AM
  3. Short term trailing stop?
    By kingie_d in forum Trading Strategies/Systems
    Replies: 4
    Last Post: 7th-March-2008, 09:28 PM
  4. Trailing Stop - Where should it go?
    By brettc4 in forum Trading Strategies/Systems
    Replies: 13
    Last Post: 27th-August-2007, 10:24 AM
  5. Quick trailing stop loss question
    By svensk in forum Beginner's Lounge
    Replies: 7
    Last Post: 18th-June-2007, 02:28 PM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Aussie Stock Forums