ELL on close price previous bar

 

I have two questions.

1. I want to buy/sell after crossing two WMA on new bar but for price close prev bar. And after place an order 5minutes later if order will be still active (no transaction), buy/sell for every price. Someone can tell me how to write after 5 minutes buy/sell for every price. Below is my part of code.

2. I wonder, when i testing my system on history date and in last bar I have buy signal, then i will buy but for close price prev. bar off course if it'll be possible( if not then i will buy 5 minutes later for every price). Metastock will show me transaction only if this transaction really was in life ? or show me for example when i have to buy on price 1.33333, new bar open on 1.33334 and rising to 1.33339 and follow down to 1.3330 but it was not any transaction on 1.33333. Metastock will show me my transaction on 1.33333 or not? It show me in this case ? Sorry for English, i not sure is clear...

Thx for help.

Reason: