Stochastic EA - page 15

 

Great ea

sfindlay:
Folks after much head scratching I have released a new, much improved version that so far I have only tested on USDJPY and EURUSD but it backtests really well back through the years which the other version didn't and definitely does NOT burn through your equity. The drawdown is very low on this one.

Attached is the USDJPY set file. Again it is a low volume high probability trader. I will continue to evolve this but would appreciate if anybody has the time to test it.

This version has the RSI added to it. It buys when the RSI is above 45, and sells when the RSI is below 52. Also I have added:

-a slow stochastic to act as a take profit, (but you can set the take profit manually if you want)

-a %WPR to either act as an emergency stop if the price is going down fast and

- a second %WPR take profit if the price is moving up really fast.

Play around with these as you can take the emergency stop loss off for example, and manually close.

There is an ordinary Stop Loss set by default at 200, if disaster strikes that is your safety net. It will only activate if it is needed to as the logical stoplosses and take profits should kick in first.

Please if you do test it consider others and upload your set files as you find a good fit for other currencies through your backtesting.

Sir: Could you please explain this system in simple terms for us newbies. I would like to use it, or some variation of it, MANUALLY - entirely manually, so, if possible, could you let me know the template, also the basic rules reqd to take trades. Also, what are the manual entry and exit points -sorry to bother you - Thanks a lot.

Great JOB!

 

Stochastic - Combining few periods

Hi,

My target periods are M15 and M30 ... I made some EAs based on M15 + ADX and they are so-so ... On Strategy tester I get 1000-2000 maximum per month with a lot of stop losses. I would like to make one EA where I will combine few periods stochastics:

laStoK015 = iStochastic(NULL,15,5,3,3,MODE_SMA,0,MODE_MAIN, 0);

laStoK115 = iStochastic(NULL,15,5,3,3,MODE_SMA,0,MODE_MAIN, 1);

laStoD015 = iStochastic(NULL,15,5,3,3,MODE_SMA,0,MODE_SIGNAL,0);

laStoD115 = iStochastic(NULL,15,5,3,3,MODE_SMA,0,MODE_SIGNAL,1);

laStoK030 = iStochastic(NULL,30,5,3,3,MODE_SMA,0,MODE_MAIN, 0);

laStoK130 = iStochastic(NULL,30,5,3,3,MODE_SMA,0,MODE_MAIN, 1);

laStoD030 = iStochastic(NULL,30,5,3,3,MODE_SMA,0,MODE_SIGNAL,0);

laStoD130 = iStochastic(NULL,30,5,3,3,MODE_SMA,0,MODE_SIGNAL,1);

laStoK060 = iStochastic(NULL,60,5,3,3,MODE_SMA,0,MODE_MAIN, 0);

laStoK160 = iStochastic(NULL,60,5,3,3,MODE_SMA,0,MODE_MAIN, 1);

laStoD060 = iStochastic(NULL,60,5,3,3,MODE_SMA,0,MODE_SIGNAL,0);

laStoD160 = iStochastic(NULL,60,5,3,3,MODE_SMA,0,MODE_SIGNAL,1);

and IF conditions for opening positions I have such as:

if( ADX0 > 25 && laStoK115 laStoD015 && laStoK030 > laStoD030 && laStoK060 > laStoD060 && laStoD015 laADX0015 ) OpenbyBuying("BUY");

if( ADX0 > 25 && laStoK115 > laStoD115 && laStoK015 < laStoD015 && laStoK030 < laStoD030 && laStoK060 80 && laADXM015 < laADX0015 ) OpenbySelling("SELL");

And I am closing these positions if laStoK030 75. But it seems something is wrong here as I lose ALL money in half month!?

Can somebody tell me:

1. Is this logic possible to be implemented and is it logical thinking? I think this should be almost 100% openings = earnings. It should be 100% sure that price will go UP if 15, 30 and 60 mins stochastic K is above d and rising? Or I am wrong?

2. Do you know for some EA like this which minimize SL

Also I wanted to make indicator which draw stoc K and stoc D for 15 and 30 mins ... hardcoded values - without considering what period is selected ... with 4 lines there ... maybe will be messy but at least will show me lines at once. Does this make sense at all?

Thanks for help and your time

Aleksandar

 

Parameters in iStochastic?

What is difference between fast and slow stoch in simple words, and how i need to customize my iStochastic lines in code below to test fast/slow one? As i am using just 5,3,3 ... is it fast/slow/default?

Thanks

ljuba973:
Hi,

My target periods are M15 and M30 ... I made some EAs based on M15 + ADX and they are so-so ... On Strategy tester I get 1000-2000 maximum per month with a lot of stop losses. I would like to make one EA where I will combine few periods stochastics:

laStoK015 = iStochastic(NULL,15,5,3,3,MODE_SMA,0,MODE_MAIN, 0);

laStoK115 = iStochastic(NULL,15,5,3,3,MODE_SMA,0,MODE_MAIN, 1);

laStoD015 = iStochastic(NULL,15,5,3,3,MODE_SMA,0,MODE_SIGNAL,0);

laStoD115 = iStochastic(NULL,15,5,3,3,MODE_SMA,0,MODE_SIGNAL,1);

laStoK030 = iStochastic(NULL,30,5,3,3,MODE_SMA,0,MODE_MAIN, 0);

laStoK130 = iStochastic(NULL,30,5,3,3,MODE_SMA,0,MODE_MAIN, 1);

laStoD030 = iStochastic(NULL,30,5,3,3,MODE_SMA,0,MODE_SIGNAL,0);

laStoD130 = iStochastic(NULL,30,5,3,3,MODE_SMA,0,MODE_SIGNAL,1);

laStoK060 = iStochastic(NULL,60,5,3,3,MODE_SMA,0,MODE_MAIN, 0);

laStoK160 = iStochastic(NULL,60,5,3,3,MODE_SMA,0,MODE_MAIN, 1);

laStoD060 = iStochastic(NULL,60,5,3,3,MODE_SMA,0,MODE_SIGNAL,0);

laStoD160 = iStochastic(NULL,60,5,3,3,MODE_SMA,0,MODE_SIGNAL,1);

and IF conditions for opening positions I have such as:

if( ADX0 > 25 && laStoK115 laStoD015 && laStoK030 > laStoD030 && laStoK060 > laStoD060 && laStoD015 laADX0015 ) OpenbyBuying("BUY");

if( ADX0 > 25 && laStoK115 > laStoD115 && laStoK015 < laStoD015 && laStoK030 < laStoD030 && laStoK060 80 && laADXM015 < laADX0015 ) OpenbySelling("SELL");

And I am closing these positions if laStoK030 75. But it seems something is wrong here as I lose ALL money in half month!?

Can somebody tell me:

1. Is this logic possible to be implemented and is it logical thinking? I think this should be almost 100% openings = earnings. It should be 100% sure that price will go UP if 15, 30 and 60 mins stochastic K is above d and rising? Or I am wrong?

2. Do you know for some EA like this which minimize SL

Also I wanted to make indicator which draw stoc K and stoc D for 15 and 30 mins ... hardcoded values - without considering what period is selected ... with 4 lines there ... maybe will be messy but at least will show me lines at once. Does this make sense at all?

Thanks for help and your time

Aleksandar
 

Simple Stochastic/EMA Strategy

Greetings:

I was hoping someone could code a simple EA for me. I am a newbie and dont have computing skills. I have been using the following strategy for some time (manually), with pretty decent results.

The process is very simple and I'm sure there are similar ones out there.

WORK with 1 LOT

BUY WHEN:

1. Stochastic crosses (%K crosses above %D) at or below 40

AND

2. Price closes above 13 EMA -- note this may take 3-4 bars - If it doesn't close above 13 EMA within 4 bars, then pass on the trade.

EXIT: Set SL at 20 pips -- and/or CLOSE Trade out at Profit of 30 pips.

ALSO, SELL if strategy reverses ie, BUY Signal becomes Sell Signal. and vice versa

SELL SIGNAL:

SELL WHEN:

1. Stochastic crosses at or above 70

2. Price closes below 13 EMA -- once again, this should take place within 4 bars.

... Any help/suggestions in coding this will be much appreciated.

Thanks.

 

Here's the EA I'm using with my own strategy. It'll do what you want for your EMA part, but not for your stochs part. Maybe someone can implement that for you.

Hope this helps,

Happy trading,

Ms_Mel

Files:
macrossea.mq4  33 kb
 

Thanks

Ms. Mel:

Thanks for your reply - could you please briefly explain the method of your strategy - I assume its been doing well for you.

Thanks again, and good luck.

..Tomo

 

Order send error #130

I keep getting this 130 error while trying to back test the Mack Histogram V4. Does anyone know what might cause this? Thanks

LJS

 
ljone:
I keep getting this 130 error while trying to back test the Mack Histogram V4. Does anyone know what might cause this? Thanks LJS

Hi, error 130 means wrong SL. Probably you SL is too close to the current price.

You can get this error in some cases, one of them - if EA was coded for 4 digits broker and you use it with 5 digits broker.

You could try to use other SL value, for example 200 instead of 20.

 
Files:
 
kaamos:
Hi epsilon:

I took a little time and i made an expert using the conditions that you gave us.

I was trying to optimize it and looks promising. Later i will post some optimization results.

Enjoy it.

Hi guys , compiled this and gave me a error saying " is newbar " isnt referenced and will be removed " . now the ea doesnt open trades , but looking throught the journal , you can see it trying to open , but fails .., any ideas ? sorry , this post

https://www.mql5.com/en/forum/179114

post 14

Reason: