Hi, i wanna create a really simple exit strategy for stocks and apply it to some other simple strategies i am trying out with stocks.
What i want to do is create a exit strategy that exits the position if the position is in profit 5 minutes before market closing. It should keep doing this for 4 days and on the 5th day sell either way (despite being in loss) 5 minute before market closes.
Here is a simple strategy for entering stochastics (2,3) on 30 and exit at 70 (and short the opposite). Now i want to add in the above exit strategy. What code do i write?
Because codes are only read once at Close of the bar, and if you are using this code on a daily timeframe, it is not possible to make it do things before the end of the day. Until we get the multitimeframe support, I do not see any accurate solution I’m sorry!
To help us continually offer you the best experience on ProRealCode, we use cookies. By clicking on "Continue" you are agreeing to our use of them. You can also check our "privacy policy" page for more information.Continue