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

[amibroker] Re: AASettings



PureBytes Links

Trading Reference Links

So why does this simple test of Actions always sort column 4 (a minus 
means descending), no matter scan, explore or backtest ???

Title = "TestActions";

/* actionScan = 3
actionExplore = 4
actionBacktest = 5 */

IIf( Status("action") == actionScan, SetSortColumns (-2),
	IIf( Status("action") == actionExplore, SetSortColumns (-3),
		IIf( Status("action") == actionBacktest, 
SetSortColumns (-4),Null)));

//RSI 70/30 Crossover ***Optimized***

pds=14;
pds=Optimize("pds",14,8,23,3);

Buy=Ref(RSI(pds),-1) < 30 AND RSI(pds) >= 30;
Sell=Ref(RSI(pds),-1) > 70 AND RSI(pds) <= 70;
Short=Ref(RSI(pds),-1) > 70 AND RSI(pds) <= 70;
Cover=Ref(RSI(pds),-1) < 30 AND RSI(pds) >= 30;

Filter=Buy OR Sell OR Short OR Cover;
Buy=ExRem(Buy,Sell); Sell=ExRem(Sell,Buy); Short=ExRem(Short,Cover); 
Cover=ExRem(Cover,Short);

AddColumn(Buy,"Buy");
AddColumn(Sell,"sell");
AddColumn(Short,"short");
AddColumn(Cover,"cover");

GraphXSpace = 5;

--- In amibroker@xxxxxxxxxxxxxxx, "tuzo_wilson" <j.tuzo.wilson@xxx> 
wrote:
>
> --- In amibroker@xxxxxxxxxxxxxxx, "gmorlosky" <gmorlosky@> wrote:
> >
> > Where did you find or discover the information that varibale 
> > AAsetting is assigned "Status("action"). Is this deep code 
> > understanding or something us common folk should be able to 
lookup ?
> 
> It's in the user guide and online:
> 
> http://www.amibroker.com/guide/afl/afl_view.php?id=141
> 
> It can also be seen in many code examples.  e.g.
> http://www.amibroker.com/guide/a_custommetrics.html
> 
> There are actually 6 values with predefined constants you can use in
> AFL to make your code more readable:
> 
> actionIndicator = 1
> actionCommentary = 2
> actionScan = 3
> actionExplore = 4
> actionBacktest = 5
> actionPortfolio = 6 
> 
> actionPortfolio is used when running a custom backtest.
> 
> 
> Tuzo
>



------------------------------------

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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

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/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

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