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

[amibroker] Re: need a loop


  • Date: Sat, 28 Nov 2009 01:55:00 -0000
  • From: "Mike" <sfclimbers@xxxxxxxxx>
  • Subject: [amibroker] Re: need a loop

PureBytes Links

Trading Reference Links

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 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/

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:
    amibroker-digest@xxxxxxxxxxxxxxx 
    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/