Hi,

I am trying a simple inside day breakout strategy that is running on a different platform currently. (Disclaimer: I am new here with very limited coding knowledge. Any questions posted with obvious answers are purely out of desperation after many failed attempts. Please be kind, I will get there one day... )  In plain English, here is the idea:

- check data for inside day H[0] < H[1] and L[0] > L[1]

- store range of inside day (insideRange = H-L)

- ignore Sundays due to limited data (using daily data but would it be better to consolidate hourly into a daily bar?)

- place buy stop and sell stop at H and L with a limit at H + insideRange and L - insideRange

- position size is calculated as (cash * risk percentage * close) /  insideRange to covert JPY back to USD

- orders remain valid until triggered or replaced with a new one (in case of another inside day)

Sounds pretty simple but a couple of challenges I can't work out. I created a log for inside days and comparing with other chart data, there is no inside day on some of the days the log fires a notification. Order execution also seems incorrect with entry orders being triggered in both directions (is this because of the daily data I am using?).

I really appreciate any help with this as on the n-th iteration and still nowhere closer than at the beginning...

Thanks