avoiding FIFO snafu.

To add comments, please log in or register
maxbilllzzz
137
maxbilllzzz  

Hello community,

When making a robot, is it possible to program a robot in such a way that it can determine FIFO for positions of the same size and instrument in the same account?

If, for example, I have 7 positions of the same size and instrument in one account, with seven robots on seven screens, and a robot tries to send a signal to close, can it be programmed to discern which position was taken first, and close the same at market?

I set my Magic Number to zero for my robots, which does mostly work, but should the market move quickly, 2 or 3 robots can send a trade signal to close a position at the same time. I'll get a FIFO violation, and the trade will not execute, or will close late.

Any suggestions?

Fernando Carreiro
4711
Fernando Carreiro  
maxbilllzzz:

Hello community,

When making a robot, is it possible to program a robot in such a way that it can determine FIFO for positions of the same size and instrument in the same account?

If, for example, I have 7 positions of the same size and instrument in one account, with seven robots on seven screens, and a robot tries to send a signal to close, can it be programmed to discern which position was taken first, and close the same at market?

I set my Magic Number to zero for my robots, which does mostly work, but should the market move quickly, 2 or 3 robots can send a trade signal to close a position at the same time. I'll get a FIFO violation, and the trade will not execute, or will close late.

Any suggestions?

Yes, it is possible but its complex. Also, you should not use the magic number "0" for EAs as that is reserved for manual trades.
maxbilllzzz
137
maxbilllzzz  
Good to know, thanks, Fernando.
To add comments, please log in or register