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

RE: [amibroker] Setting up Yes/No Flags



PureBytes Links

Trading Reference Links

Hi Duke,

 

That did it.  Plus you have shown me that I don’t need two lines of code

 

NH = C >= HHV( Close, 21);
And 
NHF = WriteIf(NH, "Yes", " ");
 
I can drop the last line and use the AddTextColumn referencing the NH variable.
 

And thanks for including the graphic of your exploration results as it has given me some additional ideas.

 

Regards,

 

Dave


From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Duke Jones, CMT
Sent: Sunday, February 12, 2006 11:20 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] Setting up Yes/No Flags

 

Dave,

I think the fix is to use AddTextColumn.

Example: AddTextColumn( WriteIf( U1, "Yes", "" ), "Possible Reversal",1.2,IIf(U1=1,colorLightBlue, colorWhite));

Regards,

Duke Jones, CMT

marketmonk777 wrote:

Hi folks,
 
I am starting to create various conditions to perform visual checks on
explorations.  For example I have a line of code that checks to see if
the closing price is a 21 day new closing high:
 
NH = C >= HHV( Close, 21);
this returns a 1.00 or a 0.00
 
I would like to take this example and a number of other conditions
that I would like to test for and create columns for them in the output.
 
But I really don't want to see a 1.00 or a 0.00.  What I would like to
see is a Yes or a No (even better would be a Yes or a null).
 
So I added the following line below the one above to convert the data
type from a number to a string:
NHF = WriteIf(NH, "Yes", " ");  // New High Flag
 
My problem is I can easily add the following:
AddColumn(NH, "NH");   which will add a column and display a 1.00 or a
0.00 (with formating I could get that to display a 1 or a 0).
 
What I would like to use though is the NHF variable. I have tried all
sorts of combinations with no luck.
 
This one AddColumn(WriteIf(NH, "Yes", "No"), "NHF"); gives me an error
that states: 
Error 5. Argument #1 has incorrect type (the function expects
different argument type here)
 
I am stumped.   Please help.
 
Thanks,
 
Dave
MarketMonk777
a.k.a. RedEyes
 
 
 
 
 
 
------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~-> 
 
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 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/
 
<*> 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/
 
 
 
 
 
  




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 other support material please check also:
http://www.amibroker.com/support.html





SPONSORED LINKS
Investment management software Real estate investment software Investment property software
Software support Real estate investment analysis software Investment software


YAHOO! GROUPS LINKS