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

[amibroker] Re: Detecting Cause Of Trade EXIT Signal - Help !



PureBytes Links

Trading Reference Links

Hi Gordon,

Sunday, July 4, 2004, 2:53:18 PM, you wrote:

G> This looks like a simple syntax issue:

G> IIf(PrimeA, AddColumn(13000000 / Close, "Shares", format = 1.0),
G> AddColumn(10000000 / Close, "Shares", format = 1.0));

G> would be

G> AddColumn(
G>     IIf(PrimeA, 13000000 / Close, 10000000 / Close),
G>     "Shares", 1.0
G>     );

G> You don't need the "format = ", btw. Hope it helps.

It appears you are absolutely correct.  Now, setting PrimeA = true or
false varies the "Shares" amount.

Why?  I don't understand.  Why can I not format this?

I ask because I want to even add more complexity to this statement.
For example, I trade some stocks that are very expensive (more than
US$10,000 per share).  These stocks have a trading unit of 1 share.
In these cases I don't need a format statement.  It is what it is in
those cases.

But, other stocks I trade have a trading unit of 1,000 shares, and
some stocks I trade have a trading unit of 100 shares. So, I'd like a
format statement to round down to the nearest 1,000, or nearest 100,
based on the symbol.

How can I do this if a format statement breaks my code?

Many thanks by the way.  I would never have guessed at the solution.

Yuki



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.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/