Your strategy says buy when 10SMA IS above 20SMA and 20SMA IS above 50SMA and so forth. It does not say buy when CROSS above.
The code should be:

if(SMA10[0]>SMA20[0] and SMA20[0]>SMA50[0] and SMA50[0]>SMA100[0])
enterLong();