I mean something like (if I understood you problem correctly)
PositionScore = iif(C > 0.5, PositionScore, 0);
or
PositionScore = PositionScore AND C > 0.5;
Of course you should set PositonScore to some value before.
best
On Thu, Apr 28, 2016 at 2:09 PM, 'Bruce Wood' bruce.wood@bigpond.com [amibroker] <amibroker@yahoogroups.com> wrote:
Hi Marcin,Thank-you for your advices.Just to clarify:The first suggestion was to to edit the Watch-list, and exclude any stocks under the price requirement (50 cents). I don't see this to be a practical solution for back-testing, given the number of stocks, and the duration (years) of the back-test period.Consequently, I need the code to exclude a stock if the price of the stock is 50 cents or lower. What you have suggested by having a value of "0" for stocks lower than 50 cents would probably work, however I do not know how to code that in the PositionScore coding?I want the back-testing to exclude these low value stocks, as well not buying these stocks into the Portfolio. (Back-testing results should accurately reflect actual trading outcomes).Any help would be appreciated.Best regardsBruceSent: 28 April, 2016 6:50 PMTo: AmibrokerSubject: Re: [amibroker] Re: Help with Rotational Trading System code.
Bruce,So you don't want to exclude low value stocks from backtesting, but only from buying. Assigning PositionScore = 0 to stocks with C < 0.5 should do it.best regardsOn Thu, Apr 28, 2016 at 8:06 AM, 'Bruce Wood' bruce.wood@bigpond.com [amibroker] <amibroker@yahoogroups.com> wrote:
Hi Adam,Thank-you for your advices.My intention would be to trade a basket of stocks in an Index, and during my back-test periods, it may happen that a stock may move to my "exclusion zone" (Closing Price of 50 cents or under). If the stock again recovers above 50 cents, it would again be eligible to enter the portfolio. That is why I would like the Trading System code to manage this price condition, rather having to pro-actively maintain watch-lists throughout back-test periods (years and 300 stocks).Thanks again, and best regardsBruce W.Sent: 28 April, 2016 3:46 PMSubject: [amibroker] Re: Help with Rotational Trading System code.Hi Trendchaser
I think the easiest way is to set up a watchlist with the high value stocks that you want included in the rotational trading system.Then select FILTER and select the WATCHLIST you set up to backtest.I am testing rotational systems and have watchlists set up for industries, regions, commodities, market capitalisation and mixtures of the above.Regards Adam
--
Marcin Jagodziński
Marcin Jagodziński
__._,_.___
Posted by: =?UTF-8?Q?Marcin_Jagodzi=C5=84ski?= <marcin.jagodzinski@gmail.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (7) |
Upgrade your account with the latest Yahoo Mail app
Get organized with the fast and easy-to-use Yahoo Mail app. Upgrade today!
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
.
__,_._,___
EmoticonEmoticon