Trading Silver with PSAR SUPERTREND EA plus ZigandZag & PSAR Oscillator Confirming

 

Trading Silver with PSAR SUPERTREND EA plus ZigandZag & PSAR Oscillator Confirming

My interest presently is in trading precious metals, primarily Silver & Gold.

Recently I downloaded the PSar Supertrend EA and ZigAndZag indicator from the Trading System Forex blog, plus the PSAR Oscillator from Forex TSD.

I backtested them along with other EAs on Silver. Tests were done over several periods from Jan 3, 2011 to early May 2011, then over the entire period. The PSar Supertrend EA performed better than the others, though the results weren't spectacular.

I used some alternate settings on the Psar Supertrend EA, then ran a back test based on the buy/sell signals generated by the ZigAndZag indicator.

Since the only way to run the backtest was to note the date the reversal signal was generated, test for that period and note the gain or loss updating the account balance as I went along, I can't provide a unified graph showing the results. I CAN provide the graphs for the individual periods (some losses, some no trades taken, but mostly winning trades) though there are a total of 18 reversal signals/periods involved, so 18 graphs.

However, just using MT4's 'long only/short only' option on the Experts Properties Testing tab (in Strategy Tester), matched to the ZigAndZag trend change arrows, the Psar Supertrend EA grew a Jan 3, 2011 $1,000 opening balance to over $38,000 by May 11th, 2011.

Switching manually is not terribly practical; I was wondering if someone could combine the ZIGandZAG indicator and the Psar Oscillator with the PSar Supertrend EA, so that the EA would only trade in the indicated market direction?

Since the ZigandZag does repaint, going forward I am using the PSAR Oscillator as the confirmation of the trend change. (ZigandZag arrow appears, at opening of next bar or when Psar Osc crosses up/down EA only trades long/short). Presently I am ignoring intermediate signals in the same direction, though those could well be used to put on additional positions.

Attached below are the relevant software. Thank you in advance for any assistance you can offer and be assured I will do everything within my ability to support the TSD forum and it's traders. I'll be happy to provide my settings and any further testing & trading results I obtain. The more folks trading this method the better.

Ps: Ran out of attachment space; will add a screenprint as an example of what it all looks like in a separate email to follow this one.

JJ Johnson

 

Screen print of trading screen

As promised, here is the screen print of the trading screen.

 

hi johnson

your method is very intresting

if it work corectly

please get some guidenece about it

and upload super trend again

thanks

 

seems interesting indicator

It seems interesting. What i have understood is that your system has three elements/indicators.

1.Zig-Zag indicator

2.Red/blue signal indicator on chart

3.Oscillator

When all three are in same direction then initiate buy/sell, is it correct?

 

To Mayanksaini 11:

You are close in your description. Actually, the ZigZag indicator is a variant called ZigAndZag. The red and blue arrows are part of the ZigAndZag (ZAZ) indicator. The actual line zigging and zagging is more for visual clarity, though someone might find a way to trade with it (just not me).

When the ZAZ arrows and the Parabolic SAR Oscillator indicators both give the same signal you want the EA to trade in the new market direction.

The PSAR Oscillator will generally cross over a bar or so after the ZAZ arrow appears, so they work nicely together to confirm the market trend.

The PSAR Supertrend EA uses the Supertrend indicator in opening & closing trades. The trick is to get it to only trade in the direction of the market.

To a_esmaeily:

"if it works correctly" is indeed the thing I hope we can demonstrate once the Psar Supertrend EA can use the trend direction indicators to guide it's trading.

In running the demo, the only thing I did was set the EA inputs, note the dates the trend change arrows occured, and then let the EA trade (or not trade) according to it's program. No tricks or gimmicks, just let it run, then noted the results.

As you requested, I am attaching the Supertrend indicator again. I opened the original attachment and it seemed OK. Let me know what particular problem you are having with it.

There are a couple of other variations of the Supertrend indicator here on the TSD forum; I will also attach one of them (Supertrend clean mtf).

Have a GREAT day!!

JJ

 

EA settings

Thanks for sharing, in order to be able to test could you share the settings you used for the EA as I'm not getting any trades? Thanks again

 

To Leeb:

I'm not sure why you aren't getting any trades. Try setting the Supertrend indicator inputs to 45.

I have several different sets of inputs, all of which seem to trade with varying degrees of success. I use the 45 period setting on the Supertrend for all of them.Besides, this is the indicator the EA is trading off of. Let me know if that helps.

Meanwhile, I've attached one report using the default settings on the Psar Supertrend EA, just to show how the EA functions with just the market direction guidance.

Once the EA is able to read the ZAZ and Psar Oscillator, I will test it out on various other settings and post them for everyone to see.

JJ

 

Thanks JJ could you post the template you use?

 

New EA

Hi JJ

Again thanks for sharing your idea, that's what makes this forum great.

I have worked on the EA for you and now it should only trade in the direction when other indicators agree.

My only concern is it will work best in trending markets and how it will deal with sideways periods.

Anyway my friend I've attached the code.

 

To Leeb:

Thank you for contributing your coding skills to this effort!

I have attached the template, as requested.

From a quick test, it appears that the EA is picking up the buy signal, but not recognizing the sell signals. I've attached the test run so you can see what I mean.

Just for reference, the ZAZ arrows show major turning points for the period of January 3, 2011 through May 6, 2011 as follows:

Jan 3 - sell only till Jan 7

Jan 7 close shorts and buy only till Jan 12

Jan 12 close longs and sell only till Jan 17

Jan 17 close shorts and buy only till Jan 19

Jan 19 close longs and sell only till Jan 28

Jan 28 close shorts and buy only till Feb 22

Feb 22 close longs and sell only till Feb 25

Feb 25 close shorts and buy only till Mar 7

Mar 7 close longs and sell only till Mar 11

Mar 11 close shorts and buy only till Mar 14 (No trades taken)

Mar 14 close longs and sell only till Mar15 (No trades taken)

Mar 15 close shorts and buy only till Mar 24 (No trades taken)

Mar 24 close longs and sell only till Mar 28

Mar 28 close shorts and buy only till April 25

April 25 close longs and sell only till April 26 (No trades taken)

April 26 close shorts and buy only till April 28

April 28 close longs and sell only till May 6

May 6 close shorts and buy only till May 11

May 11 close longs...

As you can see, not all direction changes resulted in trades, particularly during ranging markets.

How you word it so the EA knows to ignore subsequent signals in the same direction but will recognize the opposite signal combo, that I don't know.

Hope you find this as challenging and as fun as I do!!

JJ

 

PSAR Supertrend

Hello JJ

I thought I would take a look at your system with the interest to compliment Leeb's great efforts.

I generally develop and test my EAs using EURUSD 5M and I set your system up that way. Are you OK with testing EURUSD? One immediate problem I notice is that the ZAZ seems to repaint the Arrows. I took two shots where in 1 the red arrow at the beginning of the trading day was visible and the other it was hidden due to different quotes 12 or 13 bars in the future. Have you seen this type of repainting of the ZAZ indicator and does it matter. It seems like the EA would appear to give false signals when in fact the signal was valid at the time.In my screen shots where would you enter as it seems the SAR lags the ZAZ arrows by at least 1 to 3 bars. I assume its upon SAR conformation. Finally, I do not see any sell rules in the thread, what do you use?

Files:
with_.gif  23 kb
without_.gif  23 kb
Reason: