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

RE: [amibroker] Re: need a loop


  • Date: Sun, 29 Nov 2009 10:19:27 -0600
  • From: "Joris Schuller" <jschuller@xxxxxxxxxxx>
  • Subject: RE: [amibroker] Re: need a loop

PureBytes Links

Trading Reference Links



Probably the reason this doesn’t work that the BuyNot condition requires an exact Zero;

Add the following lines and it will work.

 

Criterion=Param("Criterion",0.0001,0,0.002,0.00001);

BuyNotCond=IIf(abs(Close % 0.0010)<Criterion,1,0);

AddColumn(Cond1," BuyNotCond ",1.4);

 

 

 

From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Panos Boufardeas
Sent: Saturday, November 28, 2009 8:32 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] Re: need a loop

 

 



Hello
Mike,This time I will sent a picture that we can see the results that I
don’t understand and I keep replay on this email.
Have a look at the 3 column please, it is more clear that what i am talking
about
http://bit.ly/8S5gfs

As i said before the contition "buyNOT" never return to 1, and also the
contition "BuyNormal" has various mistakes for me ...

BuyNot =!(Close % 0.0010); WriteVal(BuyNot )+" = buyNot ";
BuyNormal = (Close % 0.0010); WriteVal(BuyNormal)+" = BuyNormal";
Filter =1 ; //expolre
AddColumn(C,"Close",1.4);
AddColumn(BuyNot ,"BuyNot",1.4,colorYellow,colorBlack);
AddColumn(BuyNormal ,"BuyNormal ",1.4);

thank you again
Panos

At 03:55 28-11-2009 28-11-2009, you wrote:
>
>
>For all the values you gave, the results you describe are correct. None of
>the value you gave are multiples of 0.0010, which means that none of them
>will return true for !(Close % 0.0010)
>
>Likewise, none of them are multiples of 0.0010, which means that all of
>them will return true for (Close % 0.0010)
>
>Just set your code to exactly what I gave and see if it works for you.
>
>Buy = !(Close % 0.0010);
>
>Test it against quotes that match what you're looking for
>
>e.g.
>1.2560, 1.2580, etc.
>
>Mike
>
>--- In <mailto:amibroker%40yahoogroups.com>amibroker@xxxxxxxxxxxxxxx,
>Panos Boufardeas <panosbouf@xxx> wrote:
> >
> > hi again
> > I have 1 minute database, I look inside at the "quote editor" window and
> > the data looks like that sample here = 1.2658
> > Then I press BarReplay to see what happen with this 2 following lines
> >
> > BuyNot =!(Close % 0.0010); WriteVal(BuyNot )+" = buyNot ";
> > BuyNormal = (Close % 0.0010); WriteVal(BuyNormal)+" = BuyNormal";
> >
> > The results are
> > BuyNot : stay allways ZERO
> > BuyNormal : return to ONE not only in every 10 ticks but also in other
> > prices
> > for example ONE I have also at
> > 1.2697,1.2689,1.2579,1.2557,1.2567,1.2558
> >
> > and I don't know what I am missing here?
> >
> > Thank you
> > Panos
> >
> >
> > At 07:50 27-11-2009 27-11-2009, you wrote:
> > >
> > >
> > >Hi,
> > >
> > >I already gave the example in my last post.
> > >
> > >Buy = !(Close % 0.0010); // Evenly divisible by 0.0010
> > >
> > >That's all there is.
> > >
> > >What the operator does is return the remainder after doing a division.
> So,
> > >in the above, you are dividing Close by 0.0010. If the result is evenly
> > >divisible, the remainder will be 0. Using the 'not' operator (i.e. !)
> > >against 0 will return 1. Therefore, you will Buy when Close is evenly
> > >divisible by 0.0010, which is the same as buying at x.0010, x.0020, ...
> > >
> > >Mike
> > >
> > >
> >
>
>



__._,_.___


**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/





Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___