Indicators: AutoTrendLines

 

AutoTrendLines:

Indicator automatically identifies points and it draws support and resistance trend lines on them. There are two type of calculation lines.

AutoTrendLines type 1 (EXM_EXM)

Author: Serhii Ivanenko

 

How to Exit While Trading with Trendlines

Talking Points:

  • Traders should focus on their exit plan just as much as their trade entries.
  • Trendline traders could set their stop losses beyond the nearest support or resistance level and set their limits within the nearest support or resistance level.
  • Setting exit prices according to support and resistance levels could tip the odds in your favor.
How Important Is Your Exit Strategy?

Many traders have a strong set of rules that they follow to enter trades, but have difficulty in selecting their exits. This is troubling because how we exit a trade should be just as important, if not more important than how a trade is entered. After all, our exits ultimately determine if our trades are profitable for us or not. So we need to make sure our exit strategy is just as logical as our entry strategy.

When we place our trades based on trendlines, we are placing them based on support and resistance levels. We are thinking the price will bounce off a trendline like it did in the past. I propose we use the same logic when setting our stops and limits.


In the example above, it’s easy to see the sell entry that was given to us based on the bearish trendline. We entered right at the trendline looking for a bounce back down, but where do we want to exit? When do we call it quits if the trade goes against us? Where do we place our profit target? Let’s take a look.

Setting Stops Beyond Support/Resistance

We need to look at placing our stop somewhere above this trendline. If the resistance is broken through, we were wrong on the trade and should accept the loss quickly. It’s possible that price could return back to profitable territory after breaking this resistance, but we cannot rely on being lucky. We can only trade based on what we see.



I like to set my stop 5-25 pips from the closest support/resistance level depending on the time frame I am trading. The smaller the time frame of the chart, the tighter I will place my stops. On this trade, I set my stop 5-6 pips away from my entry since that was beyond the resistance line as well as the previous swing high (Bounce #2).

Remember that when we set our Stop loss, this is also setting our monetary risk on the trade. So we also need to consider our trade side in respect to our Stop loss distance.

Setting Limits Within Support/Resistance


Now that our stop is set, we need to focus on our profit target. For our limit placement, we have two objectives:

  • Our limit’s distance needs to be further than our stop’s distance.
  • Our limit needs to be placed within the closest support/resistance (by at least 5 pips).
The reason we want our limit further than our stop is because we always want to try to make more money than what we are risking on each individual trade. This is something we discuss heavily at DailyFX so I will say it again here. We want a positive risk/reward ratio.

And the reason we want our limit to be placed within the closest support/resistance level (by at least 5 pips) is for the exact same rationale we used to open this trade to begin with. We know prices have a tendency to bounce off price levels they have bounced off of before, so we want to make sure that no support/resistance is in between our entry and our limit level. In the example below you can see I placed my limit 5 pips above the swing low (potential support). This gives price a clear path to a profitable trade.


Trendline Strategy Complete

This trendline strategy is one that can be used universally across all currency pairs and time frames so it is definitely a worthwhile style of trading to learn. The logic behind the entry and exit rules is also something that can be tailored to other types of strategies as well. Good trading!



 
Is there a version for MT4 using this indicator?
 
I do not know same indicator for MT4. There are similar indicator uploaded on this page
 
How can I use it for an Expert Advisor?
 
Aira MJ:
How can I use it for an Expert Advisor?

double valors = ObjectGetDouble(0, "Current_Support", OBJPROP_PRICE, 0);
   double valorr = ObjectGetDouble(0, "Current_Resistance", OBJPROP_PRICE, 0);
   
      //Comment("Suporte: "+valors + " resistência; "+valorr);
      
   
   double diff =    (PriceInfo1[0].low -valors);

Buy 64%

if(
      PositionsTotal() == 0
      ....
       && diff <=  valordim



Sell 72% precision

if(
      PositionsTotal() == 0
       ...
        && PriceInfo1[0].high >=  valorr

 
Jacinto José:

Please edit your post and use the code button (Alt+S) when pasting code.

EDIT your original post, please do not just post the code correctly in a new post.

Please only post code that will compile.

Please also format your code to make it easier to read - it is very untidy.

 
Autotrendlines is one of the best free indicators. Many thanks to the creator of this indicator. But it has a big problem! It removes any trend line that the user itself draws. I have been waiting a long time for being fix of this problem. So I'll be very thankful if this problem is solved in the new update.
 
Autotrendlines is one of the best free indicators. Many thanks to the creator of this indicator. But it has a big problem! It removes any trend line that the user itself draws. I have been waiting a long time for being fix of this problem. So I'll be very thankful if this problem is solved in the new update.