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

[amibroker] Re: Only long or short and no repeated signals



PureBytes Links

Trading Reference Links

I prefer not to use ExRem, but solve the problem of getting rid of 
repeated signals this way (see code example below).  It takes a trade 
when a "buy" condition is true today, but was false yesterday, and 
displays up/down arrows on a chart as a visual signal.  Maybe you can 
modify it to suit your needs.


S.



Cond1="Your buy rule";
Cond2="Your sell rule";

Cond3=Flip(Cond1,Cond2);

Buy=Cond3 == 1 AND Ref(Cond3,-1)==0;
Sell=Cond3 == 0 AND Ref(Cond3,-1)==1;

shape=Buy*shapeUpArrow+Sell*shapeDownArrow;

PlotShapes(shape,IIf(Buy, colorGreen, colorRed),0,IIf(Buy, Low,High));





--- In amibroker@xxxxxxxxxxxxxxx, "Tradingbasis" <tzg@xxxx> wrote:
>
> Hello,
> 
>  
> 
> i have some troubles to build a system that goes only long or short 
(not
> both at the same time) and only
> 
> goes long when no long position is opened and only short if no short
> position is open.
> 
> Can someone help ?
> 
> I have tried with the exrem but have not got it to work 
successfully. I want
> to display the signals graphically.
> 
>  
> 
> - - - - - - - - - - - - - - - - - - - - 
> 
> Best regards
> 
>  
> 
> Thomas
> 
> www.tradingbasis.com
> 
> support@xxxx
> 
> - - - - - - - - - - - - - - - - - - - -
>






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

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

 
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/