I created a simple indicator that highlights occurences of double inside bars. It plots this on the chart and also outputs a bool=true when a double inside bar is detected.
I created a basic strategy to verify the signals reliability. It will create a manual OCO order to capture the breakout after a double inside bar is detected.
I have two problems that I am struggling with;
1) One of the OCO orders is automatically thrown out after the first double inside bar is detected. The error message doesnt help me too much and I am not sure where to start looking for a fix. All subsequent OCO orders seem to get created successfully.
2) The strategy appears to be detecting erroneous occurences of double inside bars. I have added print statements within the indicator and the strategy; the indicator seems to be running OK internally but the strategy looks like it is detecting bool=true on the indicator output. I suspect that the strategy is handling things correctly and that it's the way that my indicator is creating it's bool output that is the problem.
The OCO order management is still very basic - I am just trying to test the validity of the indicator so please dont laugh
I appreciate your help and comments.
Thanks!
Comment