JCL - you are totally correct on the variables and the IF statement. I was confused by the unexpected behaviour of the enterShort() function. I apologise for rambling on about it.

On the correct use of enterShort - suppose the current price is 10 and I want to go short at 15 if the market touches 15, and 15 is determined as the variable Dot11High. Do I include the condition that (priceClose() == Dot11High) in the IF statement?

Thus this will be evaluated on each tick and once the condition is met, the trade is entered and the condition is no longer evaluated on this bar(?)

EDIT: corrected priceClose().

Last edited by DMB; 11/07/13 09:27.