Thank you for your hint, Andrew.
However, it's the case that it doesn't place the Limit Order around +- 0.2% from the current price but rather in close proximity to the price...
I don't understand this logic.
if(priceC(0) <= priceO(0) and NumPendingShort <= 0)
{
OrderLimit = priceO(0)-(priceC(1)*(0.2/100)); // 0.2% Distance from current Price
MaxShort = 1;
enterShort();
}
else if(priceC(0) >= priceO(0) and NumPendingLong <= 0)
{
OrderLimit = priceO(0)+(priceC(1)*(0.2/100));// 0.2% Distance from current Price
MaxLong = 1;
enterLong();
}