Announcement

Collapse
No announcement yet.

Help with new Strategy

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Hi,

    There were a couple of logic errors in your short code.

    The reversals are due to your check for ma recross in the stop code. I added some changes to that code to show when you exited due to a reversal or due to a stop.

    I also changed the price you exit if it's only due to a reversal to use open(0).

    Steve
    Attached Files

    Comment


    • #17
      Here's a great way to automate the ticksize parameter: (originally posted by stevehare2003 here: http://forum.esignalcentral.com/show...n%2A#post63016 )

      I'm using this for a new bollinger band strategy and need it to get more accurate entry/exit prices.


      Outside main ()

      //get ticksize
      var mMove=1000;
      function Min_Move(){
      var cDelta = Math.abs(close(0)-close(-1));
      if (cDelta) mMove = Math.min(cDelta,mMove);
      }



      then inside main:

      //call ticksize function
      if (getCurrentBarIndex()<-3 && getCurrentBarCount() >3) Min_Move();

      Comment

      Working...
      X