PureBytes Links
Trading Reference Links
|
1 - Have you plotted the StopPriceArr to know that this is correct?
Or is it changing each bar, such that the stop is always fluctuating
and the price will never trigger it. You might need something like
StopPriceArr = HighestSince(Buy, StopPriceArr, 1) to kinda lock in
the trail.
2 - If you are trying to plot the stop you may need to utilize
Equity(1); somewhere in your code.
I might not understand your system too well, so perhaps additional
clarification might help...
- chris
--- In amibroker@xxxxxxxxxxxxxxx, "enzo" <herrfrechdax@xxxx> wrote:
>
> Hello!
>
> some days ago I asked for help, how to use APPLYSTOP() to turn a
> position when a CLOSE crossed a certain stop which is defined as a
> price. It looks like this is not possible!?
>
> So I thought I could use the difference between the payed price and
> the stop-price and use APPLYSTOP() with Mode=2(stopTypeLoss) type=2
(
> amount in points) amount=calculated difference in points.
>
> Would someone confirm this is the right way to do?
>
> For the payed price I would use arrays BUYPRICE and SELLPRICE, but
I
> have found out, they are exactly similar to the OPEN price of the
> day (or bar) the buysignal occurred. Even I set SetTradeDelays( 1,
> 1, 1, 1 ) ; Why does BUYPRICE and SELLPRICE not reflect the real
> payed price? Do I have to create correct BUYPRICE and SELLPRICE
> arrays by myself?
>
> Thanx for any suggestions,
>
> enzo
>
>
>
>
>
>
> --- In amibroker@xxxxxxxxxxxxxxx, "enzo" <herrfrechdax@xxxx> wrote:
> >
> > Hello usergroup!
> >
> > In my AITM trading-system buy- and sell-signals are generated at
> > CLOSE and executed at next open. Stops are set at the last
> > SwingHighs/-lows before the signal occurred. Those SH/SH´s are
> > written in an array "StopPriceArr". A close beyound/below a stop
> > should turn the position and be executed at next open.
> > Can someone help me to code the stops?
> >
> >
> > So far I coded:
> >
> > SetTradeDelays( 1, 1, 1, 1 ) ;
> > SetOption("ActivateStopsImmediately",True);
> > .
> > .
> > .
> > BUY=BuyCondition;
> > SELL=SellCondition;
> > ApplyStop(0,2,StopPriceArr,2);
> > Short = Sell;
> > Cover = Buy;
> >
> >
> > It seems it is not working as I expected and actually I am not
> > surprised by it, cause I cannot make a sense of the combinations
> of
> > ApplyStop-paramaters.
> >
> > Can you?
> >
> > Thanx in advance
> > enzo
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/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/
|