Wapen, an EMA, PSAR, Stoch EA

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.

Wapen, an EMA, PSAR, Stoch EA

Post by SteveHopwood »

SERIOUS WARNING
  • Most Forex traders lose all their money.
    Using the robot posted here in trading Forex does not guarantee success.
    Trading this robot could lead to serious financial loss.
    Trading this robot without understanding its underlying trading strategies guarantees traders will lose their money.
    This is not a set-and-forget ea. There is no such thing and anyone who tells you there is, is either a liar or an idiot. It should quickly become obvious why manual intervention will be necessary from time to time.
    At best, a trading robot is only 90% as good as the manual strategy it trades. At best. At worst, it can be much less effective. If the strategy is rubbish, so is the robot.
    To trade this robot, you have to understand:
    • How to use EA's.
      Moving Averages
      Stochastic
      Parabolic Stop and Reverse
DO NOT TRADE THIS EA ON A LIVE ACCOUNT. IT IS EXPERIMENTAL.

Ehup all

I received this pm from Wapen late last week:

"Hi Steve,

I have been trading a system for a will now with sum good results on manual but are wandering to see if there are better settings than I use and to have it automated.

First, this is not a system that I developed but have found it on the net on 2 or 3 places for free.

The follow indicators and original system settings are used,
-Exponential Moving Average (100 on close)
-Parabolic SAR (0.01, 0.2)
-Stochastic Oscillator (%K 7, Slowing 4, %D 10)



The original system work as follow:
For a Buy opportunity the following conditions must be in place. Price must be above the EMA, pSAR must be below the price and Stochastic signal line must be above 70. The example above are at the EMA cross, but that’s not always the case as sum-times the pSAR and stochastic do not meet the criteria and it will wait for all to meet the criteria.

Sell are the opposite.

There can be multi-pal entries as the price my move slightly down and the pSAR, stochastic will change and when they are meeting the conditions again a new entry are formed.

SL are at the previous bars pSAR and trailing with every new bar.
TP is this when the price hit the Trailing SL.

I have already observed that the the BUY and SELL conditions are sometime late and a better entry are when the stochastic signal line crosses the 50 (and not the 30 (sell) 70 (buy)).

TP are also better when using 3 to 4 bars back pSAR as a to early ex set have been observed.

My thinking is that the EA must have the following variables.
For entry:
Moving Average, possibility to set the Period, MA method and applied price.
PSAR, to set Step, Maximum.
Stochastic, to set %K, Slowing, %D , price field and MA method, as well as the level the signal line cross to give the entry signal.

TP, as fixed TP, or a TP based on the Trailing stop.

Stop Loss, The SL must still follow the pSAR but the amount of bars back one must be able to set.

I'm having success with most currencies and on the 1H, 4H and Daily chart.
"

This was clearly nice and easy to code, so I have done so. The bot has all the usual stuff, so read the attached user guide for details. Most of it is disabled by default (apart from balance and margin filters which default to best settings), so you can safely ignore it all if you are new to all this.

Strategy specific inputs are included within the 'Wapen strategy inputs' section (or 'strategt' according to the typo. Who needs a strategy when you can have an infinitely superior strategt?) :lol: Anything ending with TimeFrame, such as StochTimeFrame, allows you to consult the indi on a different time frame to that of the chart onto which the EA is loaded; the default means, 'current time frame'. Leave these inputs alone until you know what Stoch, MA and PSAR indi's tell you.

In conclusion
No idea where all this is heading. No idea if the strategy has long-term legs. Let's see.

:D

Matters of general interest

Read this post:
http://www.forexfactory.com/showthread. ... ost4923611 Newbie traders, read this for inspiration and warning. Those of you who have suffered losses, read it for inspiration. There is a thread devoted to Sam's trading method at http://www.forexfactory.com/showthre...25#post5118825

Masterly summary of hedging: http://www.forexfactory.com/showthread. ... ost4977179

EA coding
I receive may requests to code EA's. Traders, if I code your EA for free, then I will share it here. If you want me to code your EA without sharing, then my fee is $100 payable into my paypal account. I explain why at http://www.forexfactory.com/showthread. ... ost4431794, at the bottom of the post.

Useful utilities/EA's/scripts
Matt's chart-population script at http://www.stevehopwoodforex.com/phpBB3 ... 5733#p5733. Use this every time you start a fresh platform.
MaryJane has posted a fabulous utility to allow us to resize EA input windows: http://www.forexfactory.com/showthread.php?t=299017
Multi purpose trade manager: http://www.forexfactory.com/showthread.php?t=89371
Account equity analyser: http://www.forexfactory.com/showthread. ... ost4693716 Also at http://www.forexfactory.com/showthread. ... ost4709098, which includes a template for both USD and the Euro.
Past-trades display indi by squalou; shows a graphical display of the success/failure of trades in your History tab. Breathtaking piece of work. http://www.forexfactory.com/showthread. ... ost3830610
My shell EA – the code I use to produce EA's so quickly. http://www.stevehopwoodforex.com/phpBB3 ... p?f=5&t=15
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.
musketeer
Trader
Posts: 15
Joined: Wed Dec 14, 2011 3:05 am

Re: Wapen, an EMA, PSAR, Stoch EA

Post by musketeer »

1H OTOB 1 lot flathttp://screencast.com/t/aJka4xVFfRzO
4H OTOB 1 lot flat http://screencast.com/t/6nwrgN1ZcDPQ
1D OTOB 1 lot flat http://screencast.com/t/TekpogNGr

all tests are form 2011.01.01 to 2012.01.04 the spread in test is 3.0 pips
Last edited by musketeer on Tue Mar 27, 2012 5:14 am, edited 1 time in total.
User avatar
Wapen
Trader
Posts: 91
Joined: Tue Nov 29, 2011 7:24 pm
Location: Gauteng, South Africa

Re: Wapen, an EMA, PSAR, Stoch EA

Post by Wapen »

musketeer wrote:1H OTOB 1 lot flathttp://screencast.com/t/aJka4xVFfRzO
1H OTOB 1 lot flat http://screencast.com/t/6nwrgN1ZcDPQ
1H OTOB 1 lot flat http://screencast.com/t/TekpogNGr

all tests are form 2011.01.01 to 2012.01.04 the spread in test is 3.0 pips
Hi,

First thanks to Steve for coding this.

I have been trading this system for a short time and have not to bad results but was wandering what the long term back test will look like. It only confermend that there should be better setting for this strategy to work. I'm already running test to see what will work better.

Wapen
nubika
Trader
Posts: 80
Joined: Tue Dec 06, 2011 9:52 pm
Location: Sydney, Hills District

Re: Wapen, an EMA, PSAR, Stoch EA

Post by nubika »

Hi Steve,

I am running wapen EA for 2 weeks now. and noticed the following. The original system as explained below is incorrect. I am watching the EA placing the orders exactly as it is described below. but in reality it should be the other way around. (Your part coding the EA is spot on.)

Please make the following change to the EA. Leave everything as it is, just reverse the buy and sell actions. That is what is needed and nothing else to make this an excellent EA. All trades taken on my charts should be the opposite to what is described below.

Or, just add the option for trade direction Buy = true/false, sell = true/false. If you select false, the EA will place the opposing trade action.

"The original system work as follow:
For a Buy opportunity the following conditions must be in place. Price must be above the EMA, pSAR must be below the price and Stochastic signal line must be above 70. The example above are at the EMA cross, but that’s not always the case as sum-times the pSAR and stochastic do not meet the criteria and it will wait for all to meet the criteria.

Sell are the opposite.


Only when you have the time. But this change should be very easy, since all stays the same only the buy/sell action needs to be reversed. I am not sure if you are running this or anyone else is running it, but if you do you can easily see what I am talking about, by going through the trades placed on the charts.

Thanks

Frank
Last edited by nubika on Sat Mar 24, 2012 12:41 am, edited 1 time in total.
acostafulano
Trader
Posts: 243
Joined: Tue Dec 06, 2011 3:40 pm

Re: Wapen, an EMA, PSAR, Stoch EA

Post by acostafulano »

nubika wrote:Hi Steve,

Can you post a screenshot for these?

Only when you have the time. But this change should be very easy, since all stays the same only the buy/sell action needs to be reversed. I am not sure if you are running this or anyone else is running it, but if you do you can easily see what I am talking about, by going through the trades placed on the charts.

Thanks

Frank
nubika
Trader
Posts: 80
Joined: Tue Dec 06, 2011 9:52 pm
Location: Sydney, Hills District

Re: Wapen, an EMA, PSAR, Stoch EA

Post by nubika »

Hi,

Here are some screen shots.

All platforms are as per original from last week. They were not restarted so no chance for repaints.

On the 19th. of March I was still using Steve's original recommendation on the stoch settings of 50, 50 instead of 70 and 30, but the last few days I went back to the original.

The 50, 50 setting is a bit better and had more winners but not that good. when you look at the stoch indicator and the actual trades taken you will see exactly what I was saying in my earlier post. So it might have some merit.

Frank

2 x screenshots
ScreenShot002.jpg
ScreenShot001.jpg
You do not have the required permissions to view the files attached to this post.
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: Wapen, an EMA, PSAR, Stoch EA

Post by SteveHopwood »

nubika wrote:Hi Steve,

I am running wapen EA for 2 weeks now. and noticed the following. The original system as explained below is incorrect. I am watching the EA placing the orders exactly as it is described below. but in reality it should be the other way around. (Your part coding the EA is spot on.)

Please make the following change to the EA. Leave everything as it is, just reverse the buy and sell actions. That is what is needed and nothing else to make this an excellent EA. All trades taken on my charts should be the opposite to what is described below.

Or, just add the option for trade direction Buy = true/false, sell = true/false. If you select false, the EA will place the opposing trade action.

"The original system work as follow:
For a Buy opportunity the following conditions must be in place. Price must be above the EMA, pSAR must be below the price and Stochastic signal line must be above 70. The example above are at the EMA cross, but that’s not always the case as sum-times the pSAR and stochastic do not meet the criteria and it will wait for all to meet the criteria.

Sell are the opposite.


Only when you have the time. But this change should be very easy, since all stays the same only the buy/sell action needs to be reversed. I am not sure if you are running this or anyone else is running it, but if you do you can easily see what I am talking about, by going through the trades placed on the charts.

Thanks

Frank
Have a play with the update in post 1. TradeOppositeDirection is the input that tells the bot to reverse the trades.

: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.
carolco
Trader
Posts: 37
Joined: Tue Nov 15, 2011 9:50 pm

Re: Wapen, an EMA, PSAR, Stoch EA

Post by carolco »

Hi Steve! Did you consider to add "TradeOppositeDirection" to your future bot as default (of course into "discrete systems" only)? Im demoing about 7 your bots and i noticed that some of them would be extremly profitable if theyd contain this feature. I think that way we can turn consistent looser bot into profitable.

I know that a strategy as an instrument in hands of experienced trader could be very profitable so no offense to any author of systems automated here.

Thanks anyway
Image
xfr8dog
Posts: 9
Joined: Thu Dec 08, 2011 6:56 pm

Re: Wapen, an EMA, PSAR, Stoch EA

Post by xfr8dog »

Hi,

If we use the TradeOppositeDirection = True, the trailing Psar stop will not work, since we are trading towards the Psar instead of away from it.

Anders
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: Wapen, an EMA, PSAR, Stoch EA

Post by SteveHopwood »

xfr8dog wrote:Hi,

If we use the TradeOppositeDirection = True, the trailing Psar stop will not work, since we are trading towards the Psar instead of away from it.

Anders
Nor will any of the other trend filters such as trend, Hanover etc. Turn them off if playing with this. I forgot to mention this.

Basically, TradeOppositeDirection buggers up the bot. It tickles me that people think that such a thing is so easy as simply trading the opposite to a signal. I am not entirely sure what prompted me to accommodate such a ludicrous request.

Must have been a brain-seize moment. Hey ho.

: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.
Locked

Return to “Automated trading systems”