in Search

MA crossover with stop loss

Last post 08-01-2008, 21:29 by johnl. 1 replies.
Sort Posts: Previous Next
  •  07-30-2008, 4:28 27649

    MA crossover with stop loss

    Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin;}

    Hi there

    My first post here. Using Metastock 8 for about 5 years now but till today never found this forum. Don’t have any experience with writing formula. Only here found about pdf with formulas.

    I have probably stupid question but don’t have answer :-(

    I would like to test some moving averages crossover system with stops in Enhanced System tester. So started with one that is by default there.

    Long/buy to cover: Mov(C,opt1,E) > Mov(C,opt2,E)

    Short/sell: Mov(C,opt1,E) < Mov(C,opt2,E)

     When I put stops at for example 40 points. It closes position when market goes against position for 40 points but it opens it on the next bar if ema1>ema2 is still valid

     What I would like to add is stop loss in points. So when market drops/jumps certain amount of points to close position and to WAIT for the next cross to enter next position.

    I hope you know what I mean

     Cheers and thanks for great forum

     

     

     

  •  08-01-2008, 21:29 27663 in reply to 27649

    Re: MA crossover with stop loss

        I avoid that by turning the indicator into a spike.
        If variable a1=1 over several periods and I want the first a1=1 but not the others I code:
        a2:=If((a1=1) and Ref(a1,-1)=0),1,0);
        this turns a1 off after the first  signal.
        
View as RSS news feed in XML