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

RE: [amibroker] Re: TJ: switching timeframes in charts



PureBytes Links

Trading Reference Links









<span
>Hi Gary,

<span
> 

<span
>Thanks very much for your help, I hadn&#8217;t
come across &#8220;formatChar&#8221; so far. What I was looking for was the
ability to color the Explore Results Column named &#8220;Trade&#8221; with
either DarkGreen for a &#8220;Buy&#8221; signal or &#8220;Red&#8221; for a &#8220;Sell&#8221;
signal. Whilst this is not &#8216;mission critical&#8217; you will appreciate
it is just a small step in the learning curve. After much trial and error the
solution was pretty straightforward (always is when you get to grips with the
problem!), thus:

<span
> 

<font size=2 color=black
face="Courier New">result = <span
lang=EN-NZ >WriteIf<font
size=2 color=black face="Courier New">(Buy,<font
size=2 color=fuchsia face="Courier New">"Buy"<font
size=2 color=black face="Courier New">,<font size=2
color=fuchsia face="Courier New">"Sell"<font
size=2 color=black face="Courier New">);

<span lang=EN-NZ
>AddTextColumn<font
size=2 color=black face="Courier New">(result,<font size=2
color=fuchsia face="Courier New">"Trade"<font
size=2 color=black face="Courier New">,<font size=2
color=fuchsia face="Courier New">1.0<font size=2
color=black face="Courier New">, <font size=2 color=blue
face="Courier New">IIf<span
lang=EN-NZ >(<span
>Buy,colorDarkGreen,<span
>colorRed ));

<span
lang=EN-NZ > 

<span
lang=EN-NZ >I
will study your kind observation on how to output &#8220;<font
size=2 face="Courier New">single ASCII character<font
size=2 face="Courier New">
codes&#8221; for exporting lists &#8211; I can see
this can be a really useful function.

<span
> 



<span
>Regards,

<span
>
Gordon Sutherland



<span
> 

<span
>-----Original Message-----
From: Gary A. Serkhoshian
[mailto:serkhoshian777@xxxxxxxxx] 
Sent: Tuesday, 18 May 2004 5:03
a.m.
To: amibroker@xxxxxxxxxxxxxxx
Subject: RE: [amibroker] question
about writeif

<font size=3
face="Times New Roman"> 

<font size=2
face="Courier New">Hi Gordon,<font
size=2 face="Courier New">

Try formatChar using AddColumn.  This is the
example
from the help file:

formatChar - allows outputting single ASCII
character
codes:
Example (produces signal file accepted by various
other programs):

Buy=Cross(MACD(),Signal());
Sell=Cross(Signal(), MACD());
Filter=Buy OR Sell;
SetOption("NoDefaultColumns", True );
AddColumn( DateTime(), "Date",
formatDateTime );
AddColumn( IIf( Buy, 66, 83 ), "Signal",
formatChar );



--- Gordon Sutherland <gosuth@xxxxxxxxxx>
wrote:
> Hi,
> 
>  
> 
> I'm new to AmiBroker platform but was
struggling
> with same problem of
> getting the Explore Results window to show
"Buy" or
> "Sell" depending on the
> signal. I found the following seems to work:
> 
>  
> 
>
result=WriteIf(Buy,"Buy","Sell");
> 
>
AddTextColumn(result,"Trade",1.0,colorDarkGreen );
> 
>  
> 
> If my code is not correct please help me.
Also, I
> would like to color the
> output string "Buy" or
"Sell" either DarkGreen or
> Red (for "Sell"). Can
> someone help me here please.
> 
>  
> 
> I love AmiBroker (4.54) so far after
struggling for
> years with MetaStock and
> AIQ (MetaStock was the main struggle).
> 
>  
> 
> Regards,
> 
> 
> Gordon Sutherland
> 
>  
> 
> -----Original Message-----
> From: Graham [mailto:gkavanagh@xxxxxxxxxxxxx]

> Sent: Friday, 14 May 2004 9:46 a.m.
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: RE: [amibroker] question about
writeif
> 
>  
> 
> Writeif only gives the last bar's result, but
can
> work in the interpretation
> window
> 
> An alternative would be to use numbers
> result=Iif(bullish,1,Iif(bearish,-1,0));
> 
> 
> Cheers,
> Graham
> http://e-wire.net.au/~eb_kavan/
> 
> -----Original Message-----
> From: epintoem [mailto:epintoem@xxxxxxxxx] 
> Sent: Thursday, May 13, 2004 8:55 PM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] question about writeif
> 
> when I run this exploration for multiple days
Prev
> shows up in the 
> column....HOw can I get it show the correct
signal?
> 
>
result=WriteIf(bullish,"Buy",WriteIf(bearish,"Sell","Prev"));
> AddTextColumn(result,"Trade");
> 
> 
> TIA
> 
> 
> 
> 
> Send BUG REPORTS to bugs@xxxxxxxxxxxxx
> Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
> -----------------------------------------
> Post AmiQuote-related messages ONLY to:
> amiquote@xxxxxxxxxxxxxxx 
> (Web page:
> <a
href="">http://groups.yahoo.com/group/amiquote/messages/)
> --------------------------------------------
> Check group FAQ at:
>
<a
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> 
> Yahoo! Groups Links
> 
> 
> 
> 
> 
> 
> 
> Send BUG REPORTS to bugs@xxxxxxxxxxxxx
> Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
> -----------------------------------------
> Post AmiQuote-related messages ONLY to:
> amiquote@xxxxxxxxxxxxxxx 
> (Web page:
> <a
href="">http://groups.yahoo.com/group/amiquote/messages/)
> --------------------------------------------
> Check group FAQ at:
>
<a
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> 
> 
> 
> 
> 
>   _____  
> 
> Yahoo! Groups Links
> 
>
*         To visit your group on the
web, go to:
> <a
href="">http://groups.yahoo.com/group/amibroker/
>   
> 
>
*         To unsubscribe from this
group, send an
> email to:
> amibroker-unsubscribe@xxxxxxxxxxxxxxx
>
<mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx?subject=Unsubscribe>
> 
>   
> 
>
*         Your use of Yahoo! Groups is
subject to
> the Yahoo! Terms of
> <<a
href="">http://docs.yahoo.com/info/terms/> 
Service. 
> 
> 



      
     
      
__________________________________
Do you Yahoo!?
SBC Yahoo! - Internet access at a great low price.
http://promo.yahoo.com/sbc/


Send BUG
REPORTS to bugs@xxxxxxxxxxxxx<span
>
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to:
amiquote@xxxxxxxxxxxxxxx 
(Web page: <a
href="">http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: <a
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html









Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html








Yahoo! Groups Sponsor


  ADVERTISEMENT 












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 the Yahoo! Terms of Service.