How to buy when RSI is 40 and sell when it is 60 every time?
Author: supermagnetman
Creation Date: 4/24/2019 3:56 AM
profile picture

supermagnetman

#1
Just trying two simple strategies as a test - I am trying to use the rules to say buy a stock when say the RSI is 40 and sell when it is 60. But I want it to do it every time - not just one time.

The second idea is to say sell a stock when it goes up 10% and then buy it back when it drops 6% over the specified time interval. Does that have to be done in script or can it be done in rules?

Thanks
George
profile picture

Eugene

#2
QUOTE:
But I want it to do it every time - not just one time.

Perhaps what you're talking about is enabled by switching the radio button "Multiple open positions allowed" at the bottom of the Rule-based Strategy.

QUOTE:
The second idea is to say sell a stock when it goes up 10% and then buy it back when it drops 6% over the specified time interval.

Actually it seems possible to achieve in Rules without much effort. But first you need to install the addon called Community.Rules. Then under Conditions, in "Price (or Volume) Action" group, you'd find a set of new rules which include the applicable ones:

1. Price is higher by X% than it was a number of bars ago
2. Price is lower by X% than it was a number of bars ago

Follow instructions in "Download Community.Rules" block i.e. create a Wiki login and we'll approve it.

P.S. And of course the 2nd idea can be done in code - there's a downloadable Strategy that does something like that: WSJ Common Sense system.
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).