Login Page - Create Account

Support Board


Date/Time: Fri, 03 May 2024 00:09:51 +0000



Post From: programming help for placing breakeven orders with a keyboard shortcut.

[2020-09-09 15:00:26]
User85195 - Posts: 60
I need programming help with the following functions to be bound to a single keyboard shortcut.

1st, retrieve the number of open positions in the market for a particular symbol. for example if I have 5 open positions in the market for the symbol NQ, then it should return the number 5.

2nd, retrieve the direction of the positions, either long or short, return this value as a boolean, true for long, false for short. for example, the 5 positions are long, so it should return True.

3rd, retrieve the breakeven price for the combined 5 open positions, for example, if SC calculates the current breakeven price for the 5 positions is 11300.50, then it should return the float number of 11300.50.

4th, on the press of the pre-defined keyboard shortcut, place 5 short stop orders at the breakeven price. for the above case, when I press the shortcut, it should place 5 sell stop orders at 11300.50.

please help!
Date Time Of Last Edit: 2020-09-09 15:02:40