The strategy buy when the RSI is > 90,
The buy code is pretty simple, i have pasted it below, it simply buys at the close of the daily bar.
Now what i am finding is happening is that the strategy is placing orders, even when the RSI setup is not true (ie when RSI is NOT > 90), yet in all the backtesting, this worked fine.
Now what i THINK is happening is that during the day, maybe the RSI value does go above 90, and hence it places the strategy, but then by the end of the day, the RSI most likely moves back down below 90, so really the strategy should NOT have placed the trade
Anyway, is there a method where i can tell it to only test at the CLOSE of the bar?
Code: Select all
If ( RSISetup ) Then buy this bar at close;