Using Chelsea's chartTraderButton code I have created buttons that buy and sell at the mid point between the Ask and Bid price. When I click the button the orders do not go through? Tested pre-market.
protected void Button3Click(object sender, RoutedEventArgs e)
{
double midPoint = (GetCurrentAsk() + GetCurrentBid())/2;
if ((GetCurrentAsk() - GetCurrentBid()) > 0.01 )
EnterShortLimit(Math.Truncate(100 * midPoint) / 100);
else
EnterShort();
}
Comment