Hi jcl, thanks for the welcome
You're doing an excellent work with this tool, I am beginning to love it!
It seems it was a just an error 'in my side' (the side just in front of the screen) :-)
I come from MetaTrader and things are very different here, I'll just have to get used to it!
I have overwritten the old script, and now it works correctly. I think that the crash I was having could be coming from these sentences:
enterLong(0.1,Close+diff,Close+diff-sl,Close+diff+tp,trailing,50);
enterShort(0.1,Close-diff,Close-diff+sl,Close-diff-tp,trailing,50);
I have modified the script, setting the Stop, TakeProfit and Trail variables before calling enterLong() and enterShort() and now it doesn't crash.
Anyway, thanks for your help!