Rounding the OrderLimit variable using round() unfortunately doesn't change the outcome. I will now contact the support team.

Thank you for your assistance until now.

This is how the final code looks like

Code
                      tick()
                      {		
                        if(priceC(0) <=  priceO(0) and NumPendingShort <= 0)
			{
				OrderLimit = roundto( (priceO(0) - (priceO(0) * (BarRange/100)) ),PIP); // 0.2% Distance from current Price
				MaxShort = 1;
				enterShort(OrderLimit);
			}

			else if(priceC(0) >= priceO(0) and NumPendingLong <= 0)
			{
					
				OrderLimit = roundto( (priceO(0) + (priceC(1) * (0.2/100)) ),PIP); // 0.2% Distance from current Price
				MaxLong = 1;
				enterLong(OrderLimit);
					
			}
                      }

Last edited by steyr; 10/23/23 08:58.