Advanced system #5 (Trend Lines Breakout System)

Post your new strategies, discoveries or just ideas for development

Re: Advanced system #5 (Trend Lines Breakout System)

Postby Haydel » Mon Feb 14, 2011 9:55 pm

n11 wrote:Hi Haydel & Edward,
* Could you give us the Manual/Guides to explain the feature of each line of INPUT section so that we
can use the EA correctly (Setup the parameters correctly).
n1



I have uploaded a new version of the EA, v1.2.1. It has basically the same functionality as 1.2 but I have removed unused code, translated comments to English and changed some input variables names to make them a little easier to understand.

The following parameters descriptions are for version v1.2.1.

inpBrokerTimeZone

Is the Broker Time Zone difference from GMT. You should ask your Broker the Time Zone they use in their MT4 Servers. If they use GMT Time Zone this parameter should be 0, otherwise use the specified differences. For GMT+10, inpBrokerTimeZone = 10; for GMT-4, inpBrokerTimeZone = -4, etc.

inpRisk

This is the percentage of the account balance to risk in every trade. For example, if this parameter is 2, then the EA will risk 2% of the account on every trade, this means that the EA calculates a different Lot size for every trade based on the Stop Loss that will be used for that trade, no matter how far or close the Stop Loss is, the EA will calculate the Lot size so that if the Stop Loss is hit, 2% of the account will be lost.

inpRiskMinLotSize

Minimum Lot Size to use when the EA calculates the lot size based on inpRisk parameter. If the calculated value for Lot Size is smaller than the value of inpRiskMinLotSize, then the value of inpRiskMinLotSize will be used for the trade.

inpRiskMaxLotSize

Maximum Lot Size to use when the EA calculates the lot size based on inpRisk parameter. If the calculated value for Lot Size is bigger than the value of inpRiskMaxLotSize, then the value of inpRiskMaxLotSize will be used for the trade.

If inpRiskMaxLotSize is 0, then the EA will not set a limit for Lot Size.

inpFixedLotSize

This parameter is ignored unless inpRisk is 0. If inpRisk is 0 then the value of inpFixedLotSize will be used for every trade.

inpPivotsStartTime

This is the EST Hour when Daily Pivot Points will be calculated. This EA has its own internal Pivot Points. These Daily Pivot Points will be calculated using 24 hours starting from the Hour before the value of inpPivotsStartTime. For example if inpPivotsStartTime is 0, then the previous 24 hours (0 to 23 ) will be used to calculate the Daily Pivot Points, if inpPivotsStartTime is 5, then the previous 24 hours (5 to 4) will be used to calculate the Daily Pivot Points.

inpMinPivotOpenDist

The rules of the strategy says that “We would also choose the second Pivot point level of support/resistance as our profit goal if the first Pivot level appears to be too close to our entry point.”

Use inpMinPivotOpenDist in pips to define the “too close” distance. If the distance between OpenPrice and the closest Pivot level is smaller than inpMinPivotOpenDist, then the next Pivot level will be used as our profit target.

inpPipsToBrakePivot

If during the first hour, the price break through the first pivot level, the EA will move the Stop Loss level to Break Even. The EA will do this if the price passes the pivot level by the value of inpPipsToBrakePivot in pips.

inpPivotTouchOffset

Distance in pips to a Pivot point to consider it as touched. This EA only sets the profit targets using Pivot point support/resistance levels. If inpPivotTouchOffset set to 0, the price should actually touch the pivot point level to hit the target.

inpPipsSLOffset

The rules of the strategy says that “A protective stop is placed just above/bellow the candle that broke through the trend line.” The EA will set a protective stop in the other trend line, if the other trend line does not exist the EA will set the protective stop at the High/Low of the entry bar +/- inpPipsSLOffset.

inpMaxSameDaySameSideTrades

If inpMaxSameDaySameSideTrades is 1, then only one buy and one sell per day will be triggered, even if the protective stop is hit and the price retest the trend lines. If you want to reenter on a trend line retest after a failed trade, then increase the value of inpMaxSameDaySameSideTrades.

inpMaxTradeTime

Sets the Hour when the trend lines will be deleted. This means that no more trades will be triggered after this hour.

inpSlipPagePoints

Set the Slip Page for every trade. The value is in points, not in pips. This means that if the broker uses 5 decimal prices, 30 points is the equivalent of 3 pips.

inpSMAFilter

This is an addition to the original rules. The value of inpSMAFilter will be used to calculate a SMA and that SMA will be used to filter Long or Short trades. By default SMA 150 is used. If the price if above SMA 150, only LONG trades will be triggered, if the price is below SMA 150, only SHORT trades will be triggered.
If inpSMAFilter is 0, then no filter will be used.

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

I hope this Quick Guide clarifies some things. If any one have any question or suggestion please let me know.

Regards,

_______________
Haydel
Haydel
 
Posts: 25
Joined: Mon Jun 21, 2010 9:24 pm

Re: Advanced system #5 (Trend Lines Breakout System)

Postby n11 » Thu Feb 17, 2011 7:19 pm

Hi Haydel,

I am using your EA 1.2.1 and having the problems:

* All my trades are losses . The reason:

a) The EA does not set Take Profit (Targets). It only sets Stop Loss . So almost the trades hit Stop Loss.
You can take a look the pix attached

b) If it sets Take Profit, It sets wrongly. For instance, the pairs:

USD/JPY , USD/CHF set unreal Target: 134.748 (See the pix attached)



I don't change anything on EA. My broker time is GMT + 2

Something WRONG with new version of EA ???


Thanks in advance

n11
Attachments
L.docx
(101.91 KiB) Downloaded 529 times
n11
 
Posts: 5
Joined: Sun Feb 13, 2011 11:24 am

Re: Advanced system #5 (Trend Lines Breakout System)

Postby Haydel » Fri Feb 18, 2011 3:07 pm

n11,

Thank you for your feed back.

I only tested the EA with GBP/USD and EUR/USD pairs. Since Edward said at the beginning, he only tested this strategy using those pairs. So I did not test with any other pair.

Well, now it is obvious that at least the EA does not work with 3 decimal pairs like USD/JPY, I do not know if the strategy will work on that pair either. Since you are testing it with USD/JPY, I will start testing with that pair to fix the EA. That way at least we will see if the strategy works with pairs that are not GBP/USD or EUR/USD.

One thing to consider about setting Take Profit price is that the EA will not set a Take Profit Price during the first Bar after the trade was opened because that can limit the breakout. But I don’t think this is related to an apparent bug using USD/JPY pair.

On the other hand, using the EA during February, both, EUR/USD and GBP/USD are having profits, at least with Alpari UK data.

I also would like to do some testing using FXDD Data, because I can see in your attachment, some EUR/USD trades resulted different form my trades.

Take a look at my attachment. The highlighted area for the SELL EUR/USD trade with date 2011.02.16 10:43. I assume that trade corresponds to your trade 2011.02.16 11:44.

That one hour difference could be due Broker Time Zones or could be that the inpBrokerTimeZone parameter is not correct. We will need to verify that.

As you can see that trade result was very different.

Regards,
_______________
Haydel
Attachments
Feb16Trade.jpg
Haydel
 
Posts: 25
Joined: Mon Jun 21, 2010 9:24 pm

Re: Advanced system #5 (Trend Lines Breakout System)

Postby n11 » Sun Feb 20, 2011 5:50 am

* Haydel Wrote:

>Thank you for your feed back.

>I only tested the EA with GBP/USD and EUR/USD pairs. Since Edward said at the beginning, >he only tested this strategy using those pairs. So I did not test with any other pair.

My reply:

I have tested many pairs (see the attachment of this reply)

* Haydel Wrote:

>Well, now it is obvious that at least the EA does not work with 3 decimal pairs like USD/JPY, I >do not know if the strategy will work on that pair either. Since you are testing it with USD/JPY, >I will start testing with that pair to fix the EA. That way at least we will see if the strategy works >with pairs that are not GBP/USD or EUR/USD.

My reply:

The problem does not only happen to USD/JPY, but it also happens to USD/CHF (5 decimals) and GBP/JPY (3 decimals). Look AGAIN the pix I have attached


* Haydel Wrote:

>One thing to consider about setting Take Profit price is that the EA will not set a Take Profit >Price during the first Bar after the trade was opened because that can limit the breakout. But I >don’t think this is related to an apparent bug using USD/JPY pair.

My reply:

I think something wrong with “ Take Profit (T/P) “ feature, too . Look again the pix I have attached, then you will see that

T/P for pairs: EUR/USD, USD/CAD, AUD/USD = 0.00050

T/P for pair: GBP/USD = 0.05000

T/P pair: USD/JPY = 0.50

HOW CAN THEY BE ? So Small !


* Haydel Wrote:

>On the other hand, using the EA during February, both, EUR/USD and GBP/USD are having >profits, at least with Alpari UK data.

>I also would like to do some testing using FXDD Data, because I can see in your attachment, >some EUR/USD trades resulted different form my trades.

>Take a look at my attachment. The highlighted area for the SELL EUR/USD trade with date >2011.02.16 10:43. I assume that trade corresponds to your trade 2011.02.16 11:44.

>That one hour difference could be due Broker Time Zones or could be that the >inpBrokerTimeZone parameter is not correct. We will need to verify that.

>As you can see that trade result was very different.

My reply:

Yes! I saw the difference on your chart and mines. I think it’s easier for you in analysing the problems if you have my charts. So I attach them

BTW! On my charts, I see the Highlighted areas. Are they starting time of the EA ? If so, does it start at 11 GMT ? When using the EA version 1.2, I saw the Highlighted areas with starting at 5

n11
Attachments
TF.GIF
n11
 
Posts: 5
Joined: Sun Feb 13, 2011 11:24 am

Re: Advanced system #5 (Trend Lines Breakout System)

Postby theforexgeek » Tue Feb 22, 2011 7:59 am

Cheers for the EA Hayden. I will run a few optimizations. Is it exactly as per the original method? I may add a few filters such as days, lots management, news, etc..
Free Forex Robot: http://theforexgeek.com/
User avatar
theforexgeek
 
Posts: 86
Joined: Thu Aug 12, 2010 7:56 am

Re: Advanced system #5 (Trend Lines Breakout System)

Postby Haydel » Tue Feb 22, 2011 1:17 pm

Hi Every one,

I have updated the EA to version 1.2.3.

n11, hopfully this new version will fix the problems with TP, please give it a try.

Thanks student8080 for the hint, on version 1.2.3 I have included a new parameter (inpDaylightSavingTime) to let the EA be aware of Daylight Saving Time. Please remember that this Daylight Saving Time refers only to Eastern Time not to your local time nor your brokers time. If Eastern Time is in Eastern Standard Time (EST) you must set inpDaylightSavingTime to false, if Eastern Time is in Eastern Daylight Time (EDT) you must set inpDaylightSavingTime to true.

Regards,
________________
Haydel
Haydel
 
Posts: 25
Joined: Mon Jun 21, 2010 9:24 pm

Re: Advanced system #5 (Trend Lines Breakout System)

Postby theforexgeek » Tue Feb 22, 2011 2:54 pm

Thanks Haydel.

Any idea why the EA will not optimize? I can run a backtest fine, but when I try to optimize it places no trades?
Free Forex Robot: http://theforexgeek.com/
User avatar
theforexgeek
 
Posts: 86
Joined: Thu Aug 12, 2010 7:56 am

Re: Advanced system #5 (Trend Lines Breakout System)

Postby Haydel » Tue Feb 22, 2011 4:30 pm

That is a good question theforexgeek.

I don't know why and it would be very useful to be able to do it.
Haydel
 
Posts: 25
Joined: Mon Jun 21, 2010 9:24 pm

Re: Advanced system #5 (Trend Lines Breakout System)

Postby Haydel » Wed Feb 23, 2011 11:32 am

Version 1.2.3. of the EA made a nice trade today with USD/CAD (See the attached image), giving a tip that this strategy may also work with that pair. Obviously, more testing is needed.

Happy trading,

___________________
Haydel
Attachments
TLBS_20110223_USDCAD.PNG
Haydel
 
Posts: 25
Joined: Mon Jun 21, 2010 9:24 pm

Re: Advanced system #5 (Trend Lines Breakout System)

Postby Ghaz » Mon Feb 28, 2011 2:14 pm

hi,

I dont get it with the times used in this strategy. I live in Germany and we have GMT+1. I use Alpari, I think they have GMT+1, too (they say it a little bit complicated at their homepage).
My problem is, that Edward uses 0-4 am at EST. When I am not wrong, this is 6-10 (10.59) at my time. But at this time, the breakout has allready be done, because Frankfurt opens at 8 o clock and London follows an hour later.
Is here anybody who uses this strategy at my timezone?-would be nice if you answer....
I went back up to an half year....and the breakout normally occurs at 8-10.

what do you think?


thanks,

Ghaz
Ghaz
 
Posts: 25
Joined: Thu Dec 17, 2009 6:12 pm

PreviousNext

Return to Forex trading strategies and systems



cron