Changing code of one of Steves old EA's...

Ask your basic questions confidently here. Flaming is not allowed. Sympathetic help is the order of the day.
HannesJoubert
Trader
Posts: 282
Joined: Wed Oct 30, 2013 11:06 am
Location: South Africa

Re: Changing code of one of Steves old EA's...

Post by HannesJoubert »

That is the gist of the idea Steve, yes.

My thinking behind this EA is to follow the trend. Having multiple trades opened in the direction of the trade CAN work, if the trend is long enough to absorb the whipsaws (hence the two candle rule). So, I opted to have only one trade opened in the direction of the trend, after confirmation received by two candles in the same direction, my thinking was that this would prevent over trading and exposure to the market, if we should have a huge movement in one tick, a gap, or crim shenanigans.

So, having said the above, this 1st version that you changed for me will not go into the bin at all, I will keep it to see if I can make it work, perhaps in an aggressive scalping setup, but, my original plan requires the changes as above (i.e. step 1, changes, if any to follow :D )

Cheers

H
User avatar
SpiderX
Trader
Posts: 554
Joined: Thu Aug 22, 2013 4:50 pm

Re: Changing code of one of Steves old EA's...

Post by SpiderX »

Hi Hannes, Steve,

Sorry for interrupting here.
Was thinking of testing out this idea myself before posting, but probably Hannes can also test it out and give an opinion after reading my output.

This idea should probably be implemented with the pure/original concept of the EA without any indicators or MA. My thoughts are perhaps it could be possible to monitor the success rate of the trades and reverse the logic of the EA when the profitability becomes negative.

Implementation could be like this:

Parameters:
1.Backlog , N : 5
2.Pips Threshold, T: 20

EA will keep track of the pips loss/won of the last N trades. Lets say N =5 .
When the average pips loss of the last 5 trades goes beyond the threshold, the EA switches logic, taking sells when it should take buys and taking buys when it should take sells.

For example, Results of last 5 trades: -20, 5, -40, -50, -30.
Average is less than threshold of -20, so logic reverses.
The EA will keep switching logic as the profitability of the trades changes.

This works on the assumption that the market gradually switches between conditions that are favorable and unfavorable for the EA.
As such the EA "adapts" by switching logic when it is necessary.
My opinion is that this should work best with the purest and original concept of the EA, but have yet to validate this.

Will be starting a demo to check if this could work, perhaps Hannes can also give an opinion since he has probably been testing this out longer than me.
This would only work well if the EA has sustained bursts of wins and losses.
There may be a need to separate out the logic reversal for buys and sells, but we will know after testing.

Steve, this is not a request for this feature yet (unless you love to code it for us now), just bringing it out for discussion with Hannes. :D

Cheers,
"Love is patient, love is kind. It does not envy, it does not boast, it is not proud. It does not dishonor others, it is not self-seeking, it is not easily angered, it keeps no record of wrongs.Love does not delight in evil but rejoices with the truth. It always protects, always trusts, always hopes, always perseveres."
-Corinthians 13:4-8
HannesJoubert
Trader
Posts: 282
Joined: Wed Oct 30, 2013 11:06 am
Location: South Africa

Re: Changing code of one of Steves old EA's...

Post by HannesJoubert »

Hi Spider, thanks for the reply.

You have just proved my point :mrgreen: that of my not being the sharpest tool in the shed...

If this had not worked after the beta phased I would have canned it and moved on, not even have thought about what you have suggested.

However, for myself, I think that I would rather test the EA on the method as is, bare bones for a period of at least 3 months to see where we stand, and then interpret the results accordingly.

Keep in mind that the whole premise of the EA / method is one of trend following on price action on whatever time period, saying that, the only way I see the method not being profitable is if there are prolonged periods of very small ranges, with no breakouts, across many pairs, so I am not sure if reversing trade logic would work. Hence the testing period....

Keep in mind that this is on a small live account with Iron FX (am I allowed to mention their name? if not please advise and I will refrain), and I figure that if it works on their platform, that it will most likely work better on a true ECN / STP platform...

Also, this same account is part of a rebate program, so I will get something out at least :roll: I have also decided, in order to assist in making a proper assessment, I should run the platform containing the EA on a VPS, so I am busy setting this up as well....

What do you guys think?

H
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Re: Changing code of one of Steves old EA's...

Post by SteveHopwood »

Here you are. Updated version with all the usual features. Read about those in the shell User Guide.

:D
You do not have the required permissions to view the files attached to this post.
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
HannesJoubert
Trader
Posts: 282
Joined: Wed Oct 30, 2013 11:06 am
Location: South Africa

Re: Changing code of one of Steves old EA's...

Post by HannesJoubert »

Thank you very much for the update and the user guide Steve, you are perhaps the most helpful person I have come across in this field....Keep it up, please...

Anyway, I have applied at Beeks FX for a VPS (wanting to align everything for the near future as it seems I have found my new home) Am waiting for them to set everything up.

Will apply the new EA to the VPS platform, pull the trigger and see what happens, I will keep everyone up to date.

Cheers, have a good day / evening.

H
:ugeek:
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Re: Changing code of one of Steves old EA's...

Post by SteveHopwood »

Great. I meant to ask you to let us know if the bot is successful. I will start a new thread for it if so.

:D
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
User avatar
SpiderX
Trader
Posts: 554
Joined: Thu Aug 22, 2013 4:50 pm

Re: Changing code of one of Steves old EA's...

Post by SpiderX »

Hi Hannes,

Are you planning to run this live without a demo ?
You might consider getting a cheap VPS to demo trade the EA first before getting the Beeks one
"Love is patient, love is kind. It does not envy, it does not boast, it is not proud. It does not dishonor others, it is not self-seeking, it is not easily angered, it keeps no record of wrongs.Love does not delight in evil but rejoices with the truth. It always protects, always trusts, always hopes, always perseveres."
-Corinthians 13:4-8
HannesJoubert
Trader
Posts: 282
Joined: Wed Oct 30, 2013 11:06 am
Location: South Africa

Re: Changing code of one of Steves old EA's...

Post by HannesJoubert »

Hi Spider, thanks for the heads up.

To be honest, I am not really sure who to trust in the industry, I have used two different VPS providers in the past and have been less than impressed with the performance of their platforms...I guessed that seeing as Beeks is recommended here, I could use them with confidence :?: My test period is 3 to 4 months so I signed up (prior to reading your post for recommendations, unfortunately) for that period. Not cheap I know, but at least there will be no fault finding available on that aspect of the test...

For future reference, is their someone that you can recommend?

@ Steve, will definitely keep everyone up to date.

H

BTW Steve, i had a quick look at the last EA that you sent, it looks fabulous thanks, I certainly hope that I can use most of the inputs, just have to figure out how, but I won't ask about the time thingy ;)
Last edited by HannesJoubert on Thu Oct 31, 2013 4:23 pm, edited 1 time in total.
User avatar
SpiderX
Trader
Posts: 554
Joined: Thu Aug 22, 2013 4:50 pm

Re: Changing code of one of Steves old EA's...

Post by SpiderX »

HannesJoubert wrote:Hi Spider, thanks for the heads up.

To be honest, I am not really sure who to trust in the industry, I have used two different VPS providers in the past and have been less than impressed with the performance of their platforms...I guessed that seeing as Beeks is recommended here, I could use them with confidence :?: My test period is 3 to 4 months so I signed up (prior to reading your post for recommendations, unfortunately) for that period. Not cheap I know, but at least there will be no fault finding available on that aspect of the test...

For future reference, is their someone that you can recommend?

@ Steve, will definitely keep everyone up to date.

H

Hi Hannes,

If you are getting Beeks then get it with Globalprime, at least it is cheaper due to the package.

So far the one that seems to be relatively cheap,reliable and good value for money seems to be:
http://www.ecs-webhosting.de/en/vserver.htm
(but yet have the chance to try them)

There are cheaper and probably less reliable options available at :
http://lowendbox.com/

Currently taking a vps from one of the companies from lowendbox, but trust me the trouble of downtime is not worth the price.

Cheers
"Love is patient, love is kind. It does not envy, it does not boast, it is not proud. It does not dishonor others, it is not self-seeking, it is not easily angered, it keeps no record of wrongs.Love does not delight in evil but rejoices with the truth. It always protects, always trusts, always hopes, always perseveres."
-Corinthians 13:4-8
User avatar
SpiderX
Trader
Posts: 554
Joined: Thu Aug 22, 2013 4:50 pm

Re: Changing code of one of Steves old EA's...

Post by SpiderX »

Hi Steve,

I am trying to modify your new file to the original logic.

Code: Select all

void GetCandleDirection()
{
   //Called at the start of each new candle.
   //Sets CandleDirection to up, down, none depending on the direction of the previous candlesitck
   
   CandleDirection = none;
   if (Close[1] > Open[1]) 
      if (Close[2] > Open[2]) 
         CandleDirection = up;
   
   if (Close[1] < Open[1]) 
      if (Close[2] < Open[2]) 
         CandleDirection = down;

}//void GetCandleDirection()
Is this the only portion that i need to edit ?

Cheers
"Love is patient, love is kind. It does not envy, it does not boast, it is not proud. It does not dishonor others, it is not self-seeking, it is not easily angered, it keeps no record of wrongs.Love does not delight in evil but rejoices with the truth. It always protects, always trusts, always hopes, always perseveres."
-Corinthians 13:4-8
Post Reply

Return to “EA's for Dummies.”