Doctrading

The "Supertrend + SAR" background indicator

Category: Indicators By: Doctrading Created: June 7, 2016, 7:37 AM
June 7, 2016, 7:37 AM
Indicators
9 Comments
The "Supertrend + SAR" background indicator

Hello fellow traders,

This is a simple but nice code to get a GREEN background if close > Supertrend and Parabolic SAR, and RED background if close < Supertrend and Parabolic SAR.

Simple, but effective and useful. Of course, it is better on trend markets.

It will give you clearly the way to trade, don’t enter against the trend!

Of course, you can add other conditions.

From this, you can try to test your own strategies, with this filter. I will personally try to test it in combination with precise entry / exit rules.

Regards,

ST = supertrend[3,10]
PSAR = SAR[0.02,0.02,0.2]

IF close > PSAR and close > ST THEN
 backgroundcolor(204,255,204)
ELSIF close < PSAR and close < ST THEN
 backgroundcolor(255,204,204)
ENDIF

RETURN

 

Download
Filename: Supertrend-SAR.itf
Downloads: 559
Doctrading
Doctrading Master
Hello, I'm Marc. Nice to meet you.
Author’s Profile

Comments

NAMBO40
4 years ago
#

Hello, I would like to add a 25 period SMA moving average. It's possible?

datageek
5 years ago
#

How can I get alerts on colour change?

eisi
9 years ago
#

If i switch between different Markets, the Backgroundcolour will appear where it should not. As you can see at the picture. ( https://picload.org/view/dgpogoga/supertrendsar.png.html) Does anybody know what is the problem?

ludo7769
10 years ago
#

Hello ,

J'ai la version 10.2 et ca ne marche pas, qu'est ce qui coince ? 

Merci a vous 

Tomax
10 years ago
#

is Background colour only available from 10.3 and not possible with 10.2 ?

Nicolas
10 years ago
#

Yes, colouring background by code is only available in the version 10.3. with the instruction BACKGROUNDCOLOR: http://www.prorealcode.com/documentation/backgroundcolor/

Adolfo
10 years ago
#

Shame form IG users still on 10.2...

Thanks Doc!

Doctrading
10 years ago
#

Hi Nico, I've just learnt something, thanks !

Nicolas
10 years ago
#

Hi Doc, I changed the code a bit, "RETURN" can be use all alone in version 10.3 since drawing things don't necessary need predefined variables.

ProRealCode ProRealCode
Loading...