Re: [amibroker] Re: Help with Rotational Trading System code.

 

1.  use 100 - RSI() if you don't want to short, negative PositonScore values are tricky.

2. I would rather write (50 – RSI ()) AND C > 0.50 or try iif(C  > 0.5, 100-RSI(), 0);



On Thu, Apr 28, 2016 at 2:58 PM, 'Bruce Wood' bruce.wood@bigpond.com [amibroker] <amibroker@yahoogroups.com> wrote:
 

Hi Marcin,
 
Thank-you again for providing your thoughts.
 
If I use a typical coding for PositionScore (Example shown in AB 6.00 User's Guide – page 663).
 
PositionScore = 50 – RSI ();
 
Over my back-test period, I get 173 trades taken into the Portfolio (including stocks under 50 cents).
 
If I change the code to:
 
PositionScore = 50 – RSI () AND C > 0.50;
 
The back-testing does not work. The back-testing has picked-up the first five alphabetical stock codes in the Watchlist, (I have five positions) and these five stocks remained as open trades for the full term of the back-test (Approx 64 months) . (PositionScore and rotation is obviously not working!)
 
Any other ideas?
 
Many thanks and best regards
Bruce W.
 
 
Sent: 28 April, 2016 10:20 PM
Subject: Re: [amibroker] Re: Help with Rotational Trading System code.
 
 

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 regards
Bruce
 
 
Sent: 28 April, 2016 6:50 PM
Subject: 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 regards
 
On 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 regards
Bruce W.
 
Sent: 28 April, 2016 3:46 PM
Subject: [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




--
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 (10)

Check out the automatic photo album with 1 photo(s) from this topic.
bgjjejde.png

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/


.

__,_._,___


EmoticonEmoticon