I was wondering if anyone has been able to "place a trade" on the close of the day that a certain condition was met. To be clear, I am looking for the following (using a simple example):
- 5 day moving average crosses over 10 day moving average on day X.
- "Long Open" trade is placed using the close price on day X.
I am aware that since the calculation is made using the closing price, It would technically be impossible for a computer to know to place the trade prior to the closing price. In real life, we can visualize these numbers before the close, so I was wondering if anyone has been able to emulate this effect.
Currently the way tradingview places trades using the strategy tester is:
- 5 day moving average crosses over 10 day moving average on day X.
- "Long Open" trade is placed using the open price on day X+1.