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

[amibroker] Re: Help on Debugging this If-Else Loop



PureBytes Links

Trading Reference Links

Got rid of the syntax errors but this part of the loop is not being
respected for some reason. I want to sell only if the sell price is at
least 10 pips above the buy price. Yet the formula is ignoring this
condition, whether I write it as originally in my code or as an array:

AND (SellPrice > (PriceAtBuy + 0.0010))

AND (SellPrice[ i ] > (PriceAtBuy[i] + 0.0010))


What am I doing wrong in the above code? I don't get any syntax errors
but it does not function as intended. The sell price is very often
below the buy price.

Thanks for any further input.



--- In amibroker@xxxxxxxxxxxxxxx, "ozzyapeman" <zoopfree@xxx> wrote:
>
> Thanks Graham. That was it.
> 
> 
> --- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@> wrote:
> >
> > from quick look the variables in your loop should be arrays
> > myMA1[i] < MyMA2[i]
> > 
> > -- 
> > Cheers
> > Graham Kav
> > AFL Writing Service
> > http://www.aflwriting.com
>



------------------------------------

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/