[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: I'm having problem coding ApplyStops T_T



PureBytes Links

Trading Reference Links


I have this funny problem.

I use ApplyStops as exit so I code "Sell = 0;".
But Sell = 0; pretty much screws up ExRem (Buy, Sell) lol.

I can't put Sell = Short; because it'll exclude all buy signals 
until the next short. Sometimes I have : Buy-stopped out then buy 
signal again.

Thanks for all the help so far.
IMHO applystops is the hardest to learn for amibroker. T_T
I tried the AFL reference guide examples and the stops don't appear 
in the right places all the time. >_<

--- In amibroker@xxxxxxxxxxxxxxx, Terry <MagicTH@xxxx> wrote:
> You can simply 
> Plot(Sell,²Sell², colorwhite,StyleOwnScale,0,5);
> 
> or you can use the PlotArrows function
> 
> or you can right-click on your backtest to choose automatic 
arrows. Also,
> the backtest results will tell you if the Stop was a stop loss, 
trail stop,
> etc. 
> 
> Note that a normal Sell signal = 1, while the ApplyStop functions 
Sell
> signals will = 2, 3, 4 or 5 depending on the type of stop, 
provided you
> don't use Sell = ExRem(Buy,Sell); which sets ALL the Sell signals 
= 1.
> -- 
> Terry
> 
> 
> From: "quexos0" <quexos0@xxxx>
> Reply-To: amibroker@xxxxxxxxxxxxxxx
> Date: Tue, 26 Oct 2004 04:36:01 -0000
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Re: I'm having problem coding ApplyStops T_T
> 
> 
> How then do I make visualizations of my stops?
> I still have problems making the stop losses and take profits show
> as green/red circles on Price. T_T
> 
> --- In amibroker@xxxxxxxxxxxxxxx, Terry <MagicTH@xxxx> wrote:
> > ApplyStop goes on itıs own line. You should also have a normal 
Sell
> > condition. If you don't want a normal sell, then set Sell = 0;.
> ApplyStop
> > then comes in only when the conditions warrant. PS: You have a
> very high
> > stop level of 1000 points.
> > 
> > ApplyStop(0,2,1000,1);
> > Buy = xxx;
> > Sell = yyy;
> > -- 
> > Terry
> > 
> > 
> > From: "quexos0" <quexos0@xxxx>
> > Reply-To: amibroker@xxxxxxxxxxxxxxx
> > Date: Sun, 24 Oct 2004 14:33:10 -0000
> > To: amibroker@xxxxxxxxxxxxxxx
> > Subject: [amibroker] I'm having problem coding ApplyStops T_T
> > 
> > 
> > Anyone want to give this newbie a hand with coding ApplyStops?
> > I can't seem to get Amibroker to exit at the right place.
> > 
> > What i'm using is this:
> > 
> > Buy = xxx;
> > Sell = ApplyStop(0,2,1000,1);
> > PlotShapes( IIf( Sell, shapeCircle, shapeNone ), colorGreen );
> > 
> > As you can see, I have a Buy condition (xxx = secret :p) and a
> > randomly selected stop for Sell just so I can test out the
> ApplyStop
> > code.
> > PlotShapes would plot a green circle where the Sell/Applystop 
would
> > be triggered.
> > 
> > You can see the point value of the stop is set to 1000pts, which
> > means the stop shouldn't be hit at all on ES daily bars.
> > Unfortunately I have green circles show up on the same bar or 1 
bar
> > after the entry. >_<
> > 
> > Can someone please post Applystops + Visual confirmation of stops
> > codes that do work so I can study where I went wrong? T_T
> > 
> > Thanks a lot!
> >  
> > 
> > 
> > 
> > 
> > 
> > 
> > Check AmiBroker web page at:
> > http://www.amibroker.com/
> > 
> > Check group FAQ at:
> > http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> > 
> > 
> > Yahoo! Groups Sponsor
> >  
> >  ADVERTISEMENT
> >  
> 
<http://us.ard.yahoo.com/SIG=129v6g5ib/M=294855.5468653.6549235.30011
> 76/D=g
> > 
> 
roups/S=1705632198:HM/EXP=1098714798/A=2376776/R=0/SIG=11ldm1jvc/*htt
> p://pro
> > motions.yahoo.com/ydomains2004/index.html>
> > 
> > 
> > Yahoo! Groups Links
> > * To visit your group on the web, go to:
> > * http://groups.yahoo.com/group/amibroker/
> > *  
> > * To unsubscribe from this group, send an email to:
> > * amibroker-unsubscribe@xxxxxxxxxxxxxxx
> > <mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx?
subject=Unsubscribe>
> > *  
> > * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service
> > <http://docs.yahoo.com/info/terms/> .
> 
> 
> 
> 
> 
> Check AmiBroker web page at:
> http://www.amibroker.com/
> 
> Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> 
> 
> Yahoo! Groups Sponsor
>  
>  ADVERTISEMENT
>  
<http://us.ard.yahoo.com/SIG=129gvi3m9/M=315388.5526708.6599542.30011
76/D=g
> 
roups/S=1705632198:HM/EXP=1098851767/A=2372354/R=0/SIG=12id813k2/*htt
ps://ww
> w.orchardbank.com/hcs/hcsapplication?
pf=PLApply&media=EMYHNL40F21004SS>
> 
> 
> Yahoo! Groups Links
> * To visit your group on the web, go to:
> * http://groups.yahoo.com/group/amibroker/
> *  
> * To unsubscribe from this group, send an email to:
> * amibroker-unsubscribe@xxxxxxxxxxxxxxx
> <mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx?subject=Unsubscribe>
> *  
> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
Service
> <http://docs.yahoo.com/info/terms/> .





------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/