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

Re: [amibroker] Re: setting a variable as true or false



PureBytes Links

Trading Reference Links

I'm having trouble, as usual.  ^_-

I run a "night-before" scan to identify setups.  I also have it give
me a rough idea of share amounts should a setup trigger.

The line was:

AddColumn(10000000 / Close, "Shares", format = 1.0);

This worked fine, and still does, but now I've added a bit of
complexity to the situation, and I can't come up with the right new
statement.

I have a period of time during the month I call 'PrimeA'.  Positions
size would be larger during that time than during other times.  I
don't define PrimeA in the exploration, because I'm needing to look
ahead to the next trade day, and there would be holidays to consider,
and I think floating holidays, which we now have in Japan, would
break the code.  It could probably still be done by somebody with a
great mind, but I did not think that I had to do it.

I thought I could just establish a variable PrimeA, and set it to
either true or false each time I ran the code.  I would know of
course whether the next trade day was in the PrimeA time period or
not.

Then:

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

But, no matter how I establish PrimeA: (PrimeA = False; PrimeA = 0;
PrimeA = True; PrimeA = 1;) I get the same position size in the
column "Shares".  It always gives me a share amount as if PrimeA were
perpetually true.

Obviously, I am not a programmer, and I do not *think* like a
programmer.  Can anyone who is, or does, help?  ^^_^^
 
Best,



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