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

Re: [amibroker] Re: Interactive Brokers data plugin released



PureBytes Links

Trading Reference Links

Suppose VAL1=0.70.
Then 
(VAL1>=0.65)will be true, ie (VAL1>=0.65)will be equal to 1
and
(VAL1<0.85)will be true, ie (VAL1<0.85)will be equal to 1.
It means
(VAL1>=0.65)*(VAL1<0.85) equal to 1 and
(VAL1>=0.65)*(VAL1<0.85)*colorBrightGreen equal to colorBrightGreen
All the other () will be false, ie equal to 0.
It means
COLOR=0+0+colorBrightGreen+0+0+0+0+0=colorBrightGreen
Is it more clear now?
Dimitris Tsokakis
--- In amibroker@xxxxxxxxxxxxxxx, "wooziwog" <xcitemint@xxxx> wrote:
> Thanks to Dimitris, Gary and Jayson for helping me on this one.  I 
> continue to scour this forum in an attempt to learn the AFL 
language 
> but it has been a slow process.  Thanks again for your help.  I use 
> this as one of 5 Market barometers on my charts during the day in 
> conjunction with the price action.  I am going to work on coding 
the 
> others and will post them when they are complete.  I have modified 
> the code provided by Dimitris below and have a question:  the 
asterik 
> would indicate multiplication, does this mean that a value can be 
> multipled by another value and then multiplied by a color and 
create 
> the end result as the designated color?  I was not able to find 
> documentation on this. Is this AFL"D"(imitris) code :-) ? ? 
> //Trin Barometer//
> VAL1 = Foreign("$Trin","c"); 
> Plot(VAL1,"VAL1",C);
> COLOR=
> (VAL1<=0.29)*colorBlack+
> (VAL1>=0.30)*(VAL1<0.65)*colorGreen+
> //Mega Bullish//
> (VAL1>=0.65)*(VAL1<0.85)*colorBrightGreen+//Bullish//
> (VAL1>=0.85)*(VAL1<0.95)*colorBlue+//Neutral/Bullish//
> (VAL1>=0.95)*(VAL1<1.01)*colorYellow+//Neutral Bearish//
> (VAL1>=1.01)*(VAL1<1.2)*33+//Bearish//
> (VAL1>=1.2)*(VAL1<1.8)*colorRed+//Bear Ugly//
> (VAL1>=1.8)*colorRose;//OverCooked, be alert for Market Turn//
> Plot( 10, "Ribbon", 
COLOR,styleOwnScale|styleArea|styleNoLabel,2,5 );



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com.  Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

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