jcl,

I am thinking of supporting bracket orders with my Sierra Chart plugin. I think that this is what I am supposed to do... please critique.


* To begin, there is no such thing as "Trades" in the DTC protocol. There are only orders.
* Although the brokers themselves may be NFA compliant, the user will never use NFA mode.
* Therefore, I will need my own trade management engine built into my plugin.
* After logging in, my plugin will receive a logon response message indicating which features are supported.
* If "OCOOrdersSupported" and "BracketOrdersSupported" are enabled, I can support bracket orders.
* If "UsesMultiplePositionsPerSymbolAndTradeAccount" is enabled, hedging is available. If false, hedging is not allowed (but virtual hedging is).

Logon sequence:

* Plugin logs in.
* Plugin receives configuration data upon logon response.
* User must call GET_COMPLIANCE to confirm settings.

Example: Sierra Chart is used with hedging-allowed forex broker.
* GET_COMPLIANCE == 0 (no restrictions)

Example: Sierra Chart is used with futures or stocks broker, such as IB.
* GET_COMPLIANCE == 2 (no hedging)

Example: Sierra Chart is used with NFA-compliant forex broker.
* GET_COMPLIANCE == 3 (FIFO compliance)

Example: Sierra Chart is used with NFA-compliant forex broker, and bracket orders are not supported for some reason.
* GET_COMPLIANCE == 7 (FIFO compliance + no stop loss)