Thanks, here is the method:-
private void orderManage(iOrder order, private double b, private double a, private int bv, private int av)
{
b = GetCurrentBid();
a = GetCurrentAsk();
bv = GetCurrentBidVolume();
av = GetCurrentAskVolume();
if(order != null && order.OrderAction == OrderAction.Buy)
{
if(order.LimitPrice + 1*TickSize == a && av < 10)
{
order = EnterLongLimit(tBIP,true, 1, GetCurrentAsk(tBIP), "Long");
}
else if(order.LimitPrice + 1*TickSize == a && av < 50 && av < bv)
{
order = EnterLongLimit(tBIP,true, 1, GetCurrentAsk(tBIP), "Long");
}
}
if(order != null && order.OrderAction == OrderAction.Sell)
{
if(order.LimitPrice - 1*TickSize == b && bv < 10)
{
order = EnterShortLimit(tBIP,true, 1,GetCurrentBid(tBIP), "Short");
}
else if(order.LimitPrice + 1*TickSize == a && av < 50 && av < bv)
{
order = EnterShortLimit(tBIP,true, 1,GetCurrentBid(tBIP), "Short");
}
}
}

Comment