Search results

  1. H

    Simple Coding Help - No Promise.

    Hi all, I try to write a strategy with different exits and this is my idea: enter when MA20 crosses over MA50 When profit (high since buy) is less than 5% then the system will exit: -50% of position if MA20 as trailing stop is hit -50% of position if MA50 as trailing stop is hit -Max loss is...
  2. H

    Simple Coding Help - No Promise.

    Thanks for your reply but I still can not fix it. As you can see after the first short signal, there is a green star that means closebuy signal because it crosses under violet line. This is wrong signal because it should only show after a buy. Right after that is a red star that means closeshort...
  3. H

    Simple Coding Help - No Promise.

    I tried to remove Long Shrt part and fix Relax as below. Most of strategies I have seen only use Buy and Short and the code in your post #5786 also. It does not have any relax time. I think problem is closebuy and closeshort part but really do not know how to fix it. Try code...
  4. H

    Simple Coding Help - No Promise.

    Sorry can you explain clearly because I just modified and combined many codes from internet in order to make this code. I am actually not a coder so I do not understand why this problem happened
  5. H

    Simple Coding Help - No Promise.

    I wrote a code with buy / sell / short / cover signal as below. Buy and short signal are fine but it always shows wrong close signal such as sell signal after a short or cover signal after a buy. Anyone can guild me how to remove it? Hh = HHV( H, 27 ); Ll = LLV( L, 27 ); p1 = hh - ( hh - ll )...