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

Re: [amibroker] Re: Exploration Help Please



PureBytes Links

Trading Reference Links

Hello,

For Texts WriteIf should be used.

Also as I explained many times on this list WriteIf( condition, truetext, falsetext ) function
returns SINGLE string representing the condition at 'selected bar'.

For more information on this read:
http://www.amibroker.com/guide/afl/afl_view.php?name=SELECTEDVALUE

Therefore text columns in explorations always represent the value
at the LAST BAR of selected exploration range.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: "markf2" <feierstein@xxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Tuesday, May 13, 2003 3:43 PM
Subject: [amibroker] Re: Exploration Help Please


> Graham, thanks, but tried that and got a "bad arguments" message.
> Apparently iif cannot be used with text.
> 
> Mark
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "Graham" <gkavanagh@xxxx> wrote:
> > Sorry I did not know whatif did not work in addtextcolumn
> > 
> > This may work better
> > level=iif(C > 25,"Hi","Lo");
> > 
> > Cheers,
> > Graham
> > http://groups.msn.com/ASXShareTrading
> > http://groups.msn.com/FMSAustralia
> > 
> > -----Original Message-----
> > From: markf2 [mailto:feierstein@x...] 
> > Sent: Tuesday, 13 May 2003 9:20 PM
> > To: amibroker@xxxxxxxxxxxxxxx
> > Subject: [amibroker] Re: Exploration Help Please
> > 
> > Graham- Your logic for what I want to accomplish is good, but which
> > functions to use and how to use them is the problem.  For example, to
> > add a column with text you must use AddTextColumn.  But WriteIf gives
> > error messages when inside it.  So I tried this as simple test code:
> > 
> > level=WriteIf(C > 25,"Hi","Lo");
> > Filter=1;
> > AddColumn(C, "C", 1.4 );
> > AddTextColumn(level,"Close Level");
> > 
> > Unfortunately this always returns "Hi", even if C<=25.  I think the 
> > issue is how to insert a string into AddTextColumn that varies based
> > on a condition, but nothing I've tried works.  Any more ideas? Thanks
> > for your efforts, BTW.
> > 
> > Mark
> > 
> > 
> > --- In amibroker@xxxxxxxxxxxxxxx, "Graham" <gkavanagh@xxxx> wrote:
> > > Do you mean something like
> > > EnterLong = flip(buy,sell);
> > > ExitLong = flip(sell,buy);
> > > Entershort = flip(short,cover);
> > > ExitShort = flip(cover,short);
> > >
> >
> Addcolumn(writeif(EnterLong,"long",writeif(ExitLong,"out",writeif(EnterShort
> > > ,"short",writeif(ExitShort,"out")))),"trade");
> > > 
> > > Don't know if it works, but could be something to start with, if it
> > workds
> > > that is
> > > 
> > > Cheers,
> > > Graham
> > > http://groups.msn.com/ASXShareTrading
> > > http://groups.msn.com/FMSAustralia
> > > 
> > > -----Original Message-----
> > > From: markf2 [mailto:feierstein@x...] 
> > > Sent: Tuesday, 13 May 2003 8:16 PM
> > > To: amibroker@xxxxxxxxxxxxxxx
> > > Subject: [amibroker] Exploration Help Please
> > > 
> > > Hello Everyone,Is it possible to to add a column of text to an
> > > exploration that indicates whether a trading system is long, short, or
> > > out of the market? Specifically, I need to add a column that specifies
> > > "Long" or "Short" (depending on which is the case) beginning with the
> > > bar of entry, through and including the bar before the bar of exit,
> > > then "Out" beginning with the exit bar and continuing for all bars the
> > > system's not in the market, etc.  I'd like to do this directly with
> > > whatever array(s)track this info, because inferring it through the
> > > relationship between the equity function and prices doesn't always
> > > work (for example, problems with lag if exiting with a delay). Thanks.
> > > Mark
> > > 
> > > 
> > > 
> > > Send BUG REPORTS to bugs@xxxx
> > > Send SUGGESTIONS to suggest@xxxx
> > > -----------------------------------------
> > > 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
> > http://docs.yahoo.com/info/terms/
> > 
> > 
> > 
> > Send BUG REPORTS to bugs@xxxx
> > Send SUGGESTIONS to suggest@xxxx
> > -----------------------------------------
> > 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
> http://docs.yahoo.com/info/terms/
> 
> 
> 
> 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 http://docs.yahoo.com/info/terms/ 
> 
> 
> 

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Rent DVDs Online - Over 14,500 titles.
No Late Fees & Free Shipping.
Try Netflix for FREE!
http://us.click.yahoo.com/YoVfrB/XP.FAA/uetFAA/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 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/