Ok now it's clear. Thanks very much swingtraderkk. I have only a last question. Why is it necessary use the instruction '(TradeIsShort == IsShort)' in the:
'if((TradeIsShort == IsShort) and between(TradeEntryLimit,Price-Grid/2,Price+Grid/2))' ?
I think it is sufficient write only:
'if between(TradeEntryLimit,Price-Grid/2,Price+Grid/2)'
because it isn't necessary to know if a trade is short or long.
Is it correct?
Thanks a lot.

Last edited by forexcoder; 04/08/15 11:41.