Hi all,
My team has put together a relatively simple code that looks to buy into a stock with 50% of my portfolio whenever the 13 day moving average cross over the 48 day moving average. The sell is triggered when the 48 crosses over the 30, and all shares are sold.
The main problem is that the buys seem to execute for as long as the 13 is above the 48, instead of at the close of the minute when the 13 crosses. Is there a way to fix this?