OnTick() Seems to not run

 

Good afternoon,


I have a trading system that opens an initial trade based on some conditions and creates pending orders and moves the stop loss as each pending orders are become active or it closes.

I'm running this on 2 currency pairs. 


It works perfectly until it opens a trade on both currency pairs.


So when both currency pairs have open trades, it seems like seems like the OnTick function ceases to run.


Then when I manually close one of the pairs trades, the trades start being managed again. 


Has anyone run into something similar?

 
Matt Roberts: I have a trading system that opens an initial trade based on some conditions and creates pending orders and moves the stop loss as each pending orders are become active or it closes.

I'm running this on 2 currency pairs. It works perfectly until it opens a trade on both currency pairs. So when both currency pairs have open trades, it seems like seems like the OnTick function ceases to run. Then when I manually close one of the pairs trades, the trades start being managed again. Has anyone run into something similar?

No, its not OnTick() that is the problem. It is your code that has bugs. You will need to analyse it, debug it and fix the bugs. It probably has some endless loop somewhere which causes your code to never return from the event handler.

 
Matt Roberts: it seems like seems like the OnTick function ceases to run.

How To Ask Questions The Smart Way. 2004
          Don't rush to claim that you have found a bug.
Questions Not To Ask
          My program doesn't work. I think system facility X is broken.

It is almost always your code.

 
Matt Roberts:

Good afternoon,


I have a trading system that opens an initial trade based on some conditions and creates pending orders and moves the stop loss as each pending orders are become active or it closes.

I'm running this on 2 currency pairs. 


It works perfectly until it opens a trade on both currency pairs.


So when both currency pairs have open trades, it seems like seems like the OnTick function ceases to run.


Then when I manually close one of the pairs trades, the trades start being managed again. 


Has anyone run into something similar?

when your order should be modified and it doest , an error returned in journal part , check its number and try to debug