I want to write a strategy but I don't know the function to use.
The strategy is simple by just using crossover of MA with price. If Price > MA -> Buy. I will flat the position only if the Price < MA. But I want after 3 days since the day of my buying, the exit will be activated.
For example, If I buy today because the Price > MA of the previous 20 days. I want to make sure that within the next 3 days the program will not trigger my Exit even though the Price can below the MA tomorrow. After 3 days since today. The exit will be trigger and checked if the price still < MA then the exit is triggered. If the price > MA then I still hold the stock.
Any helps will be appreciated!
Size:
Color:
rivaldo1981, don't register multiple accounts on our website please.
You can easily build this sort of strategy using the Rule-Based Wizard.
Notice the group and the extra Condition: "Current open Position is (not) older than a number of days"
Size:
Color:
Thank you very much! It's so useful.
Size:
Color: