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

RE: [amibroker] Re: Plotting Bands when Long or Short



PureBytes Links

Trading Reference Links

Sorry, I should have read your question a bit more closely.

If your stuck, there’s always looping.

 


From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of sslack88
Sent: Monday, 23 January 2006 2:26 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Re: Plotting Bands when Long or Short

 

The problem with this is that LongEntry and ShortEntry can both be 1
at the same time.

For Example,

Day 1 (long entry):  Today's Close > Yesterday's Close

Day 2: Today's Close < Yesterday's Close, setting up a short entry,
but the long stop has not been triggered, so a long position is
still active

Any other suggestions?  Thanks again, in advance.

--- In amibroker@xxxxxxxxxxxxxxx, "WALTON, Nathan"
<nathan.walton@xxxx> wrote:
>
> You could try:
>

>
> inLong = Flip(LongEntry, LongExit);
>
> inShort = Flip(ShortEntry, ShortExit);
>

>
> Plot your green band when inLong == 1, and red when inShort == 1.
>

>
> Cheers,
>
> Nathan
>
> ________________________________
>
> From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx]
On
> Behalf Of sslack88
> Sent: Monday, 23 January 2006 11:46 AM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Plotting Bands when Long or Short
>

>
> I want to plot a green band if I am in a long position, and a red
band
> if I am in a short position.  No problem, right?
>
> Here's the tricky part:
>
> ** Only one position can be open at a time
> * TrailingStop is a function I created
>
> LongEntry = C > Ref(C,-1);
> LongExit = C < TrailingStop;
>
> ShortEntry = C < Ref(C,-1);
> ShortExit = C > TrailingStop;
>
> * Remember, only one position can be open at a time.  Obviously,
> higher closes are going to exist even when I am in a short
position,
> so using the FLIP function doesn't seem to work.
>
> Any Ideas?  Thanks in advance.
>
>
>
>
>
>
>
>
>
> Please note that this group is for discussion between users only.
>
> To get support from AmiBroker please send an e-mail directly to
> SUPPORT {at} amibroker.com
>
> For other support material please check also:
> http://www.amibroker.com/support.html
>
>
>
>
>
>
> SPONSORED LINKS
>
> Investment management software
> <http://groups.yahoo.com/gads?
t=ms&k=Investment+management+software&w1=I
>
nvestment+management+software&w2=Real+estate+investment+software&w3=I
nve
>
stment+property+software&w4=Software+support&w5=Real+estate+investmen
t+a
>
nalysis+software&w6=Investment+software&c=6&s=200&.sig=_XXUzbE9l5lGlZ
NcM
> u4KNQ> 
>
> Real estate investment software
> <http://groups.yahoo.com/gads?
t=ms&k=Real+estate+investment+software&w1=
>
Investment+management+software&w2=Real+estate+investment+software&w3=
Inv
>
estment+property+software&w4=Software+support&w5=Real+estate+investme
nt+
>
analysis+software&w6=Investment+software&c=6&s=200&.sig=5_sgDczz3ArKG
MtJ
> 9tFSJA> 
>
> Investment property software
> <http://groups.yahoo.com/gads?
t=ms&k=Investment+property+software&w1=Inv
>
estment+management+software&w2=Real+estate+investment+software&w3=Inv
est
>
ment+property+software&w4=Software+support&w5=Real+estate+investment+
ana
>
lysis+software&w6=Investment+software&c=6&s=200&.sig=_N6zcwefgp4eg5n6
oX5
> WZw> 
>
> Software support
> <http://groups.yahoo.com/gads?
t=ms&k=Software+support&w1=Investment+mana
>
gement+software&w2=Real+estate+investment+software&w3=Investment+prop
ert
>
y+software&w4=Software+support&w5=Real+estate+investment+analysis+sof
twa
> re&w6=Investment+software&c=6&s=200&.sig=MJ2jP31F3n64RDZkDadU8w> 
>
> Real estate investment analysis software
> <http://groups.yahoo.com/gads?
t=ms&k=Real+estate+investment+analysis+sof
>
tware&w1=Investment+management+software&w2=Real+estate+investment+sof
twa
>
re&w3=Investment+property+software&w4=Software+support&w5=Real+estate
+in
>
vestment+analysis+software&w6=Investment+software&c=6&s=200&.sig=GmF8
PlA
> JASx0wrSaX5-Zlw> 
>
> Investment software
> <http://groups.yahoo.com/gads?
t=ms&k=Investment+software&w1=Investment+m
>
anagement+software&w2=Real+estate+investment+software&w3=Investment+p
rop
>
erty+software&w4=Software+support&w5=Real+estate+investment+analysis+
sof
>
tware&w6=Investment+software&c=6&s=200&.sig=aMgGsKT4w29dMAYUzQUKzg> 
>

>
> ________________________________
>
> YAHOO! GROUPS LINKS
>

>
> *      Visit your group "amibroker
> <http://groups.yahoo.com/group/amibroker> " on the web.
>        
> *      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/> .
>

>
> ________________________________
>







Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html





SPONSORED LINKS
Investment management software Real estate investment software Investment property software
Software support Real estate investment analysis software Investment software


YAHOO! GROUPS LINKS