My criteria is as such -
Long entry:
- 20SMA is above the 200SMA
- Price is above the 20SMA
- A red bar opens above the 20SMA, within a certain distance from the 20SMA in ticks
- The current bar passes the immediately preceding red bar to the upside, triggering the entry. In other words, a green bar overtakes a red bar above the 20SMA.
- 20SMA is below the 200SMA
- Price is below the 20SMA
- A green bar closes below the 20SMA, within a certain distance from the 20SMA in ticks
- The current bar passes the immediately preceding green bar to the downside, triggering the entry. In other words, a red bar overtakes a green bar below the 20SMA.
[deleted]
When I try to test this strategy using the analyzer, nothing happens at all. When I run the strategy on my real-time chart, the historical entries look wrong.. they're often late and following the wrong type of bar. Something is clearly wrong with my logic but I'm not sure what.

Thanks again for everything, you can close this.
Comment