Add crossing above 50 day SMA?
Author: Carloseta
Creation Date: 10/22/2010 10:31 PM
profile picture

Carloseta

#1
Can someone add a condition to my script so it only buys if the stock is crossing above the 50 day SMA?

Thanks,
Carlo


CODE:
Please log in to see this code.
[/CODE]
profile picture

Eugene

#2
Check out the QuickRef > CrossOver.
CODE:
Please log in to see this code.
profile picture

Carloseta

#3
Thanks Eugene.

I added the code but now my sell rules are not working right. Any idea why?


CODE:
Please log in to see this code.

profile picture

Eugene

#4
Because you pasted the line of code in a wrong place. It should be placed above the AtMarket entry whereas now this condition affects the exit logic.
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).