Australian (ASX) Stock Market Forum

AmiBroker - Stop/Loss Plots

Ok this is starting to become a bit clearer. Thanks for the help.
I have some more questions in relation to the chart below:

Amibroker ATR trail.png

1. Why is there no signal for the bars which I have circled in green? These would represent the highest high of the previous 10 days. It doens't appear that there is any AND in the formula so shouldn't they be showing up?

2. I have saved this code into Formula Editor and saved it as an indicator. How do I create an AFL file where I can run a scan of all stocks to get entry signals for the highest high of the last 10 days? I haven't created any AFL files before so am not sure how to do this.

Thanks
 
One minor thing that I noticed in that code which you gave me is that the ATR dips back down at times. I circled part of the chart below where this occurs. In the previous ones I posted that line went up in a step type shape (where it never goes back down, only rises). Is it possible to change it to that step type shape?

Amibroker ATR trail.png

Thanks
 
I've had a play around with the AFL codes and a bit of the explorations which is making some more sense.

I still can't get the trailing ATR to change to a "step" pattern. Does anyone know how to do this? I've searched through the formula without any luck!!
I can change the line from "thick" to "staircase" but it still comes down slightly when I want it to always be going up and never coming down.
 
In the previous ones I posted that line went up in a step type shape (where it never goes back down, only rises). Is it possible to change it to that step type shape?
Well we can go back to GP's Trailing Stop Plot. The first pic. is of the 14 period * 6 ATR adjusting per bar. The second pic. is after double clicking on a great hindsight entry place. This bar could be any bar including present time that a trade is entered and will not retreat from your buy in price.
 

Attachments

  • untitled.jpg
    untitled.jpg
    137.9 KB · Views: 7
  • untitled1.jpg
    untitled1.jpg
    110.9 KB · Views: 10
I guess I'm not really understanding what each of those trails are exactly.

1. I'm not sure why the one that doesn't stay flat retraces slightly, but never by much. Do you know why it does this even on up days?

2. Maybe I am misunderstanding you, but do you have a code for one that moves up everyday but never goes down? I only have ones that move up and then retrace slightly and ones that don't move up every day but remain flat (like the one at the start of this thread)
 
I guess I'm not really understanding what each of those trails are exactly.

1. I'm not sure why the one that doesn't stay flat retraces slightly, but never by much. Do you know why it does this even on up days?

That one from WiseStock uses HHV and LLV to plot the line and will change as these values change.

2. Maybe I am misunderstanding you, but do you have a code for one that moves up everyday but never goes down? I only have ones that move up and then retrace slightly and ones that don't move up every day but remain flat (like the one at the start of this thread)

The idea of a trailing stop is to only move in the direction of the trade. So as the GPStop Plot does (when your chosen price is clicked) only moves up when the price moves up and will remain horizontal until previous highs (for long) or lows (for shorts) are exceeded.

I do not have any other trailing stop plot that works as perfectly as the GP Trailing Stop Plot.
 
Another question, a bit off topic.

How do I create a "filter" for an exploration for the highest close value of the previous 20 days?

Is it simply, C== HHV (C,20)
or does this include the Highest High in 20 days rather than highest close ?

Thanks,
Matt
 
Another question, a bit off topic.

How do I create a "filter" for an exploration for the highest close value of the previous 20 days?

Is it simply, C== HHV (C,20)
or does this include the Highest High in 20 days rather than highest close ?

Thanks,
Matt

No, only uses the highest value of the close, not the high.
 
I have a trailing stop loss plotted on my chart. I also have one on a chart below and I click on a certain point and it trails it from the point I clicked it on. Is it possible to lock it on set date for one company and another date for another company

For example if my current trailing ATR stop is at the red point in this chart for this company. Can I keep it so that this remains the same, but for another company I had a stop trailing from the purple point? So I don't have to go back and keep clicking on the day that it trailed from?

trail stop example.png
 
Hi Everyone,

I am a newbie to the forum - I hope it is OK to re-open this thread... Also new-ish to Amibroker.

I kindly seek anyone with Amibroker knowledge for some help with Plotting an Applystop.

Using:

Applystop (stopTypeTrailing, stopModePercent, 22, 0, True,0);

I found the plotting code below.... Sadly no success with it coming up on the chart.

Equity (1);
Plot (Sell ==4, "Applystop Sell", colorRed, 1|styleOwnScale);

Any ideas?

With thanks,

Tradezy

PS Impressive forum!!
 
Hi Everyone,

I am a newbie to the forum - I hope it is OK to re-open this thread... Also new-ish to Amibroker.

I kindly seek anyone with Amibroker knowledge for some help with Plotting an Applystop.

Using:

Applystop (stopTypeTrailing, stopModePercent, 22, 0, True,0);

I found the plotting code below.... Sadly no success with it coming up on the chart.

Equity (1);
Plot (Sell ==4, "Applystop Sell", colorRed, 1|styleOwnScale);

Any ideas?

With thanks,

Tradezy

PS Impressive forum!!

Based on these examples http://www.amibroker.com/kb/2007/03/24/how-to-plot-a-trailing-stop-in-the-price-chart/ you can create any custom stop method.
 
Top