Jump to content

Trendline EA


Recommended Posts

Hello,

 

i have found a good Trendline EA that makes very good entrys at ALL Timeframes !!!

The Problem is, that the EA opens only buy orders ! X_X

Please, can somebody fix this problem ? :?:

 

Best Regards AND THAAAANKS 8-)

 

:)>-

 

 

http://www.4shared.com/file/236271403/ce185957/VilkaChuwashowaStoch.html

> FOLLOW THE RULES !!! or cry <
Link to comment
Share on other sites

Re: Trendline EA

 

Yes, please can somebody fix the Problem from my first Post ?

In the first post, the EA is the newest one with Fractals and Stochastic!

It´s a very impressive EA !

 

Please can somebody fix it ???? :-?? ^:)^

 

Thaaaaanks !!!

 

Best Regards

<):)

> FOLLOW THE RULES !!! or cry <
Link to comment
Share on other sites

  • 8 months later...
The Problem is, that the EA opens only buy orders !

Please, can somebody fix this problem ?

 

I think I see the problem. Check the stochastic calculation statement. It immediately follows the

start() function:

 

double s=iStochastic(NULL,10,14,3,3,MODE_EMA,0,MODE_MAIN,1);

 

Notice that timeframe, the second parm, is specified as 10. Well, there is no such timeframe. I suspect this causes the stochastic indicator to fail and thus s is never updated from its default initial value of 0 (zero). Buys can occur because s is always less than 80, but sells cannot occur because s is never greater than 20. I cannot find any other problem with the code that would account for the "buy only" behavior.

 

As you already have the code, just change timeframe to 0 (zero) to specify the chart's current timeframe and see if this fixes the problem. I'll test it, too, when the market opens.

Link to comment
Share on other sites

Well, this one was elusive, but then I suddenly saw that it was checking the stochastic from a 10min chart, which doesn't exist in MT4. In other words, the stoch was always 0, which was <80 for a buy, but never >20 for a sell (as per logic). The sell function also did not return true. It was built as an indicator, but the platform will not install it as an indy, so just install as an EA and ignore the indicator errors. Enjoy!

 

http://www.4shared.com/file/yvhqJpsY/VilkaChuwashowaStoch.html

 

BTW, I wonder how it was deemed impressive if it didn't work?

Edited by stovedude
Link to comment
Share on other sites

its a fixed one in post 7 Forexb

 

gbpjpy the best pair.timeframe preferred 4 hour.using .10 lot over two years from november 2008 it has made 130 percent gain with 10 percent drawdown.

 

looks a good enough ea by most standards.if anyone wants to press harder then raise lot size.

 

Strategy Tester Report

VilkaChuwashowa+Stoch

Tripleafx-AAAFx Demo (Build 229)

 

Symbol GBPJPY (Great Britain Pound vs Japanese Yen)

Period 4 Hours (H4) 2008.11.24 00:00 - 2010.11.26 20:00 (2008.11.24 - 2010.11.27)

Model Every tick (the most precise method based on all available least timeframes)

Parameters Alarmset=true; Lot=0.1; StopLoss=0; TakeProfit=0; Ind_Coment1="--- Âíåøíèå ïàðàìåòðû èíäèêàòîðà ---"; ShowFractals=true; OnAlert=false; OnPrint=false; nVilka.Upper=1; nVilka.Lower=1; Color.LineUpper=Red; Color.LineLower=Blue; Width.LineUpper=2; Width.LineLower=2; Ind_Coment2="--- Ïàðàìåòðû îòîáðàæåíèÿ îðäåðîâ ---"; ShowOrders=true; OnAlert.Orders=true; Color.OrderBuy=Blue; Color.OrderSell=Green; Width.OrderBuy=2; Width.OrderSell=2; Color.SLBuy=Red; Color.SLSell=Red; Orders.FontSize=12; Ind_Coment3="--- Ïàðàìåòðû E-mail ñîîáùåíèé ---"; SendEnter=false; SendLoss=false;

 

Bars in test 3781 Ticks modelled 28685500 Modelling quality 90.00%

Mismatched charts errors 0

 

Initial deposit 10000.00

Total net profit 13040.61 Gross profit 17537.42 Gross loss -4496.81

Profit factor 3.90 Expected payoff 266.13

Absolute drawdown 177.85 Maximal drawdown 1967.88 (9.97%) Relative drawdown 10.80% (1579.63)

 

Total trades 49 Short positions (won %) 25 (60.00%) Long positions (won %) 24 (62.50%)

Profit trades (% of total) 30 (61.22%) Loss trades (% of total) 19 (38.78%)

Largest profit trade 1834.49 loss trade -978.48

Average profit trade 584.58 loss trade -236.67

Maximum consecutive wins (profit in money) 5 (3107.82) consecutive losses (loss in money) 2 (-999.14)

Maximal consecutive profit (count of wins) 4294.69 (4) consecutive loss (count of losses) -999.14 (2)

Average consecutive wins 3 consecutive losses 2

Link to comment
Share on other sites

"SetIndexBuffer function must be called from custom indicator only"

 

What Im doing wrong ? Does it miss an indicator?

 

You're doing nothing wrong. This EA was adapted from code that was originally an indicator. As the error message points out, that particular function is not allowed in EAs. It doesn't affect the function of the EA. It only on affects chart graphics, if that.

Edited by BobR
Link to comment
Share on other sites

You're doing nothing wrong. This EA was adapted from code that was originally an indicator. As the error message points out, that particular function is not allowed in EAs. It doesn't affect the function of the EA. It only on affects chart graphics, if that.

 

Thx BobR. I'm wondering why I cant backtest this EA. I get just this message, nothing else...

Link to comment
Share on other sites

That error is an anomaly that happens with backtesting. This version should take care of that problem.

http://www.4shared.com/file/i7WzsXdo/VilkaChuwashowaStoch_2.html

 

Thx. I get still these messages:

 

2010.11.29 10:30:21 2010.08.27 16:00 VilkaChuwashowa+Stoch_2 GBPJPY,H4: OrderClose error 4107

2010.11.29 10:31:08 2010.08.27 16:00 VilkaChuwashowa+Stoch_2 GBPJPY,H4: invalid price 131.03900000 for OrderClose function

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...