PureBytes Links
Trading Reference Links
|
If that's tha case can you get this code to work:
Title = "TestActions";
/* actionIndicator = 1
actionCommentary = 2
actionScan = 3
actionExplore = 4
actionBacktest = 5
actionPortfolio = 6 */
IIf( Status("action") == 3 /* actionScan */, SetSortColumns (-2),
IIf( Status("action") == 4 /* actionExplore */,
SetSortColumns (-3),
IIf( Status("action") == 5 /* actionBacktest */,
SetSortColumns (-4),SetSortColumns (-1))));
printf("\nStatus = "+WriteVal(Status("action")));
//RSI 70/30 Crossover ***Optimized***
//Enters long/short when the RSI Oscillator goes through the 30 and
70 signals. Exit on reversal only.
//Note: Run Optimization first, insert optimized figure in ( pds= )
statement, then ( // ) out optimization line, click on backtest.
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);
IIf( Status("action") == 3 /* actionScan */, SetSortColumns (-2),
IIf( Status("action") == 4 /* actionExplore */,
SetSortColumns (-3),
IIf( Status("action") == 5 /* actionBacktest */,
SetSortColumns (-4),SetSortColumns (-1))));
printf("\nStatus = "+WriteVal(Status("action")));
AddColumn(Buy,"Buy");
AddColumn(Sell,"sell");
AddColumn(Short,"short");
AddColumn(Cover,"cover");
GraphXSpace = 5;
--- In amibroker@xxxxxxxxxxxxxxx, "tipequity" <l3456@xxx> wrote:
>
> AAsettings is just a variable name just like abc, xyz, myvar & ....
> It is not a AB function or reserve word. That is why I could not
find
> any info on it in the user guide. Ara kindly referred me Status()
in
> the user guide. It was used by someone on this board that had I
> copied. It is used to make the code more legible and elegant. All
> variables are be initialized. So the following is the correct usage:
>
> AASettings = Status("action"); //Initialize the variable AAsettings
> if (AASettings == 1)
> {
> Buy = ExRem(Buy, Sell);
> Sell = ExRem(Sell, Buy);
> Short = ExRem(Short, Cover);
> Cover = ExRem(Cover, Short);
> }
> else if (AASettings == 4)
> {
> AddColumn(Equity(), "Equity");
> AddColumn( IIf( Buy, 66, 83 ), "Signal", formatChar );
> AddColumn(Volume, "Volume");
> }
> the above code could have been written without using the variable
> AAsetting as follows:
>
> if (Status("action") == 1)
> {
> Buy = ExRem(Buy, Sell);
> Sell = ExRem(Sell, Buy);
> Short = ExRem(Short, Cover);
> Cover = ExRem(Cover, Short);
> }
> else if (Status("action") == 4)
> {
> AddColumn(Equity(), "Equity");
> AddColumn( IIf( Buy, 66, 83 ), "Signal", formatChar );
> AddColumn(Volume, "Volume");
> }
>
>
> --- In amibroker@xxxxxxxxxxxxxxx, "gmorlosky" <gmorlosky@> wrote:
> >
> > So why if I simply use this line of code, does the Formula Editor
> say
> > it is not intialized and there is no colorization of the word
> > AASettings as a defined word ? I'd like to use this etting to be
> > followed by SetSortColumns() for Explore or Scan or Backtest.
> >
> > AAsettings == 4;
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, "tipequity" <l3456@> wrote:
> > >
> > > Absolutely. The varibale AAsetting is assigned "Status
("action")"
> > and
> > > Status("action") can take on values 1 thru 5. Thanks Ara.
> > >
> > >
> > > --- In amibroker@xxxxxxxxxxxxxxx, "Ara Kaloustian" <ara1@>
wrote:
> > > >
> > > > Look in help for Status() function with "action" as the
argument
> > > >
> > > > ----- Original Message -----
> > > > From: "tipequity" <l3456@>
> > > > To: <amibroker@xxxxxxxxxxxxxxx>
> > > > Sent: Friday, March 28, 2008 6:05 PM
> > > > Subject: [amibroker] AASettings
> > > >
> > > >
> > > > > "AASettings" takes on different numerical values. I know
that
> > > > > (AASettings == 4) means running Exploration. I searched the
> > user
> > > guide
> > > > > and googled the net and search the Amibroker web site and
> could
> > > not
> > > > > find any further information. Does anybody know where I can
> get
> > > more
> > > > > info on AASettings? TIA
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > ------------------------------------
> > > > >
> > > > > 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
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
>
------------------------------------
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/
|