Re: Close<Ref(Close,-1) not working properly :(

  •  06-26-2009, 23:48

    Re: Close<Ref(Close,-1) not working properly :(

    Hi wabbit,

    Thanks for replying again. If the short entry code is wrong i will try and fix that. But as i said i have no issues with that part of the code.

    I have problem with the exit. I am ok with the trades being exited one day later than when the signal was generated.

    The only problem that i think i have is that it is exiting on the wrong logic on the fifth exit.

    So, as my original question was is that the

    ---------
    C < Ref(C,-1)
    --------

     is it working properly in the buy to cover formula?

    Because, as i said in my last post, also 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.

    So essentially, i am troubled with the buy to cover signal, doesn't matter whether it comes on the same day as of the enter short signal or one day after that. It should just follow the logic.

    So am i mistaken in logic? Am i not putting the formula correctly?


View Complete Thread