Hi wabbit,
First of all i apologize for the casual description of the problem.
The code and EST is perfectly following the logic in the short entry criteria.
The short exit criteria, however was that it should close when the previous close is lower than the the current close. Close is less than ref(Close,-1).
( For some reasons i am not able to post the formula, should have read the forums rules with a coffee cup in my hand, with coffee in it. )
( the formula, BTW, is the subject line of the thread)
Now this is the link of the new chart, With the error mentioned in the chart
http://i43.tinypic.com/9ftf5t.jpg
The thing is that i have "checked" the realistic market prices. So each signal get executed on the next day. In the chart, however, if you see that the 5th signal exit is incorrect one.
The exit should not have been there since the close ( on the day prior to the exit signal ) is > Ref(Close,-1) thats the close just before the short entry signal.
The 6th signal, is working perfectly fine with the close ( Close) of the day prior to exit is lower than the close of the day( Ref(Close,-1) just before that.
Again, i apologize for the earlier lousy description of the problem and hope that i have made my problem clear.
Peace.
STNewbie.