programmaticaly exit EA

 

Forum on trading, automated trading systems and testing trading strategies

Indicators: AutoTrendLines

newdigital, 2013.10.09 18:20

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!




 

Forum on trading, automated trading systems and testing trading strategies

Something Interesting in Forex Video May 2013

newdigital, 2013.05.20 07:13

Effective Forex Exit Strategy For Traders

Find out the best way to exit your trades with the forex exit strategy utilized by a real trader 




 

Forum on trading, automated trading systems and testing trading strategies

Which strategy is best to close the position?

newdigital, 2013.05.29 08:03

If you have a strategy so exit should be part of it. Strategy without exit is not a strategy.

What the people are using for exit?

  • Parabolic
  • overbough/oversold levels (stochastic, demark and so on)
  • support/resistance level (povit, fibo and so on)
  • opposite signal to enter
  • openning the other trade on same direction with increased lot size (martingale)
  • openning the other trade on same direction with decreased lot size but with increased take provit value (anti-martingale)


I think - closing on overbough/oversold (stochastic etc), support/resistance (povit/fibo) and simple trailing stop are most popular for the people who consider about "let the profit run"


 
Documentation on MQL5: Common Functions / ExpertRemove
Documentation on MQL5: Common Functions / ExpertRemove
  • www.mql5.com
Common Functions / ExpertRemove - Documentation on MQL5
 

Thank you both !

@Ubzen understand better what I asked !

Now it's clear how to exit !