PureBytes Links
Trading Reference Links
|
I'm
hoping that someone can help me to understand what is happening with my AFL
code.
<FONT face=Arial color=#0000ff
size=2>
AB
won't let me do the following:
<FONT face=Arial color=#0000ff
size=2>
<FONT face=Arial color=#0000ff
size=2>ShortOK = OI > 600;
if
(ShortOK) {
<FONT face=Arial color=#0000ff
size=2> do something
<FONT face=Arial color=#0000ff
size=2>}
<FONT face=Arial color=#0000ff
size=2>
It
won't let me do that because ShortOK is an array, not an integer or
boolean.
<FONT face=Arial color=#0000ff
size=2>
<FONT face=Arial color=#0000ff
size=2>
So, I
tried this:
<FONT face=Arial color=#0000ff
size=2>
<FONT face=Arial color=#0000ff
size=2>ShortOK = OI > 600;
if
(SelectedValue(ShortOK)) {
<FONT face=Arial color=#0000ff
size=2> do something
<FONT face=Arial color=#0000ff
size=2>}
<FONT face=Arial color=#0000ff
size=2>
AB
will let me do it, but I don't seem to be getting the correct value.
<FONT face=Arial color=#0000ff
size=2>
<FONT face=Arial color=#0000ff
size=2>
So, I
made up some very simple code:
<FONT face=Arial color=#0000ff
size=2>
<FONT face=Arial color=#0000ff
size=2>ShortOK = OI > 600;
Filter
= 1;
<FONT face=Arial color=#0000ff
size=2>AddColumn (ShortOK, "shortok");
<FONT face=Arial color=#0000ff
size=2>AddColumn (SelectedValue(ShortOK), "selected");
<FONT face=Arial color=#0000ff
size=2>
When I
run an exploration, I get different values for ShortOK and
SelectedValue(ShortOK) and I expected them to be the same.
<FONT face=Arial color=#0000ff
size=2>
<FONT face=Arial color=#0000ff
size=2>
So, I
must not understand what SelectedValue means and/or I don't understand how to
get my "if" statement to work.
<FONT face=Arial color=#0000ff
size=2>
Any
assistance would be appreciated, if you can wade your way through my
notes.
<FONT face=Arial color=#0000ff
size=2>
<FONT face=Arial color=#0000ff
size=2>Thanks
Yahoo! Groups Sponsor
Choose your car now!- Make -AcuraAM GeneralAston MartinAudiBentleyBMWBuickCadillacChevroletChevrolet TruckChryslerDaewooDodgeDodge TruckFerrariFordFord TruckGMCGMC TruckHondaHyundaiInfinitiIsuzuJaguarJeepKiaLamborghiniLand RoverLexusLincolnLotusMazdaMazda TruckMercedes-BenzMercuryMitsubishiNissanNissan TruckOldsmobilePlymouthPontiacPorscheRolls-RoyceSaabSaturnSubaruSuzukiToyotaToyota TruckVolkswagenVolvo
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
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|