Help creating an indicator

 

Hello all,

I was sent the following idea for an indicator script the other day by a fellow trader who was looking for someone to program it. I am submitting it here in the hopes that either someone could direct me to an equivalent indicator script, or we could work on developing this into one.

The requirements would be that it gives a popup message and/or audible alert.

The following parameters have been backtested for quite some days now and found it pretty solid on GBP/USD. Haven’t tested anything else yet.

These rules are all pretty mathematical and perfect for either an indicator or an EA with visual indicating with audible alerts (latter preferred)

Here we go:

Legend and visuals to be displayed on charts:

Short Position Watch – small red arrow down – SPW

Long Position Watch – small green arrow up – LPW

Short Position Immanent – bold red arrow down – SPI

Long Position Immanent – bold green arrow up – LPI

Short Position Immanent RSI – bold red arrow down – SPIRSI

Long Position Immanent RSI – bold green arrow up – LPIRSI

BB = Bollinger bands

Mid BB – SMA 32 >= 15 is an Up Tending Market AND Price > Lower BB – UTM - bold blue Arrow up

SMA 32 - Mid BB >= 15 is a Down Tending Market AND Price < Upper BB – DTM – bold purple Arrow down

That means if an arrow appears then take a trade in direction of the arrow.

Indicator used:

Stochastic 5,3,3; RSI 14; CGI 14; BB 14,2; SMA32; Time_Zones-black screen

Indicators and colours should be changeable

All missing indicators can be received from:

http://www.forexmt4.com/

1. Ranging Markets or not steep trending markets

1) SPW if Candle penetrates top BB and two of the following:

RSI > 70

CGI > 197

Stochastic > 80

Enter long trade next candle

EXIT: see Exit Rules

2) SPWRSI if Candle penetrates top BB and RSI goes above 70% and one of the following:

CGI > 197

Stochastic > 80

Enter short trade when RSI starts to decline below 70.

EXIT: see Exit Rules

3) SPI if Candle penetrates top BB and all of the following:

RSI > 70

CGI > 197

Stochastic > 80

Enter short trade when RSI starts to decline below 70.

EXIT: see Exit Rules

4) SP300 if CGI > 297 THEN enter Short when next candle is closing inside BB

Exit: Penetration of other side of BB

2. Ranging Markets or not steep trending markets

1) LPW if Candle penetrates lower BB and two of the following:

RSI < 30

CGI < -197

Stochastic < 20

Enter long trade next candle

EXIT: see Exit Rules

2) LPWRSI if Candle penetrates lower BB and RSI goes below 30% and one of the following:

CGI < 197

Stochastic < 20

Enter long trade when RSI starts to climb above 30.

EXIT: see Exit Rules

3) LPI if Candle penetrates lower BB and all of the following:

RSI < 30

CGI < -197

Stochastic < 20

Enter long trade when RSI starts to climb above 30.

EXIT: see Exit Rules

4) LP300 if CGI < -297 THEN enter Long when next candle is closing inside BB

Exit: Penetration of other side of BB

3. Strong trending Market

1) UTM

Do not enter Short trades!

Enter Long trade when fast stochastic crosses above slow stochastic.

Exit when Pair hits SMA32

2) DTM

Do not enter Long trades!

Enter Short trade when fast stochastic crosses below slow stochastic.

Exit when Pair hits SMA32

4. Stop Loss: 15 pips plus spread in short position

15 pips in Long position

5. Exit Short Position when

RSI < 50% AND Fast Stochastic crosses over slow Stochastic next

OR

RSI < 50% AND Fast Stochastic crosses over 20% Level next

OR

RSI RE-ENTERS O/B Levels!

OR

After the candle penetrated the other side of BB and bounced back to mid BB

OR

CGI < -250

If a opposite entry signal is given

6. Exit Long Position when

RSI > 50% AND Fast Stochastic crosses over slow Stochastic next

OR

RSI > 50% AND Fast Stochastic crosses below 70% Level next

OR

RSI RE-ENTERS O/S Levels!

OR

After the candle penetrated the other side of BB and bounced back to mid BB

OR

CGI > 250

If a opposite entry signal is given

Well, what do you guys think?

Enclosed are a few images

Thanx,

GK

Files:
gbpusd1.jpg  461 kb
gbpusd2.jpg  449 kb
gbpusd3.jpg  454 kb
 

Here are 2 more pictures for to help out:

GK

Files:
gbpusd4.jpg  437 kb
gbpusd5.jpg  464 kb
 

The following line needs more thoughts:

"4) SP300 if CGI > 297 THEN enter Short when next candle is closing inside BB

Exit: Penetration of other side of BB"

When I run this rule it appears that the pair has a hight probability to run far when it gets a HFE300, Hook from Extreme @ 300, but necessarily it does not need to run all the way to the next side of BB.

And some times it runs even further down (or up) the BB.

Even late Stochastic gives you the exit as it does on the other rules:

Exit when Stochastic crosses.

then you have the chance to get out even it never hits BB and if it goes further south (or north) then you can have more pips.

Andrew

 

To the above rules, has anyone seen scripts similar to what we are trying to accomplish here? There is no point in re-inventing the wheel if something has already been put together another time.

Thanx in advance for the help.

GK