PureBytes Links
Trading Reference Links
|
It is semantics. The last signal you get will be the last one in the
last n days, even if you have a signal every day. The chart is
revealed day by day and it shows you where the condition exists. I
can't figure out why you are using flip and it seems to make no
difference when I comment it out.
Plot the following and look at it:
plot(H, "C", colorred);
plot(L, "L", colorred);
plot(HHV(H,20), "HHV", colorblue);
plot(LLV(L,20), "LLV", colorblue);
plotshapes(buy * shapeuparrow, colorgreen);
plotshapes(sell * shapedownarrow, colorred);
This will show you where the signals come. Your formula simply tells
you when the high crosses above the high of the last 20 days. It can
do that every other day. Ditto with the low.
Barry
--- In amibroker@xxxxxxxxxxxxxxx, "zim630@xxx" <zim630@xxx> wrote:
>
> I suppose I could have been more specific. I've played with it a
> little and here is the last code I've tried:
>
> Buy=Cross(H,Ref(HHV(H,20),-1));
> Sell=Cross(Ref(LLV(L,20),-1),L) ;
> Short=Sell;
> Cover=Buy;
> intrade=Flip(Buy,Sell);
> Filter=Buy OR Sell;
> AddColumn( Buy, "BuySig", 1.0 );
> AddColumn( Sell, "SellSig", 1.0 );
>
> What I'm getting is every signal over the n-days I enter. What I'm
> looking for is just the last signal over n-days.
>
> Thanks for your response it's appreciated!!
>
> --- In amibroker@xxxxxxxxxxxxxxx, "Barry Scarborough" <razzbarry@>
> wrote:
> >
> > Reading between the lines, I guess you are using AddColumn and
the data
> > displayed isn't what you want. The filter can be the problem. If
you
> > use buy and sell and that is not the trade signal then use
something
> > else as the filter.
> >
> > If the price is wrong then set the price at the time of the trade
is
> > buyprice, sellprice, etc, and use those variables as your filter.
You
> > can also use writeif and use the trade signal as the condition.
> >
> > If I did not read between the lines correctly letting us see the
code
> > would help.
> >
> > Barry
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, "zim630@" <zim630@> wrote:
> > >
> > > I am trying to run a trading system I have in exploration
against
> > > differing lists of stocks. I am getting the raw signals and
not the
> > > Trade signals which is what I'd like to have. I've tried to
search
> > > the board but yahoo must be having problems today as all I seem
to get
> > > is server is not responding.
> > >
> > > Thanks in advance for any help.
> > >
> > > Bill
> > >
> >
>
------------------------------------
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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
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/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:amibroker-digest@xxxxxxxxxxxxxxx
mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx
<*> 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/
|