Everything works fine except I cannot get a signal back from GetAtmStrategyMarketPosition() to notify the strategy to release the buttons.
I have read the help material on using ATM Strategies, but have not been successful.
Should I be able to get a signal back whether the position is flat or not. Or do I need to build more code?
I didn't include the entire strategy to save space.
Variables:
private string entryorderid = "";
private string atmorderid = "";
AtmStrategyClose(atmorderid);
atmorderid = GetAtmStrategyUniqueId();
entryorderid = GetAtmStrategyUniqueId();
if (GetAtmStrategyMarketPosition(atmorderid) == MarketPosition.Flat)
{
tsbtnSell.Enabled = true;
tsbtnBuy.Enabled =true;
tsbtnSellMkt.Enabled = true;
tsbtnBuyMkt.Enabled =true;
tsbtnClose.Enabled = true;
}
If I place this code anywhere else, it doesn't release the buttons unless I do so manually.
Any advice you can give on direction to take, would be appreciated.
Thanks.
Regards,
TMFT

Comment