Chart Color on sma crossovers
Author: LoneTreeTrading
Creation Date: 10/20/2009 4:53 PM
profile picture

LoneTreeTrading

#1
Hi,

How do you change the bar colors and enter or exit when prices cross above or below a sma?

If the Close is > 50 day sma set the bar color to Green & buy at the closing price
If the Close is < 50 day sma set the bar color to Red & sell at the closing price

I really appreciate your support on this and all the posts here.

profile picture

Cone

#2
See SetBarColor in the QuickRef (F11).
profile picture

LoneTreeTrading

#3
I have been using this command but evidently incorrectly. This is the code that was created by "rules" and I've added the Setbarcolor:
CODE:
Please log in to see this code.
profile picture

Eugene

#4
The main problem is that you're not using CODE tags, otherwise the code looks fine.
CODE:
Please log in to see this code.
profile picture

LoneTreeTrading

#5
Thank you for your help. I really appreciate it and this forum.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).