Forum Replies Created
-
AuthorPosts
-
SaidBitarMember
Tuesday 16/2
Finally the strategy is sorted out. Thanks to Craig for his support.
sometimes small tiny stuff are the problem, who could have imagined assigning null to a variable acts different from assigning value.
Lesson Learned things should be as simple as possible.SaidBitarMemberMonday 15/2
1- Developing another trend following strategy based on momentum (even though I feel that the code is correct but the results are telling me other stuff. For sure i missed something somewhere)
one thing fixed still results are bad i think there is one more mistake hidden somewhere
SaidBitarMemberTuesday 9/2 till Sunday 14/2
1- Testing the momentum strategy in order to get more familiar with it
2- Developing another trend following strategy based on momentum (even though I feel that the code is correct but the results are telling me other stuff. For sure i missed something somewhere)
3- trying to combine two mean reversion strategies into one for two purposes
a- Increase the exposure %
b- use the same capital for two strategies
till the moment what i noticed is that trading frequencies increased which is expected, exposure increased a little bit.maybe the reason that they are so similar in nature that almost 70% of the times the signals overlap.
but still i prefer to have one capital with exposure of 25% of the time rather than 2 capitals with exposure about 20% eachRegarding trading all index filters are still in RED
so no new entriesNo exits
still holding one position
SaidBitarMemberHere is the definition of Position Score
Quote:USING POSITION SCOREYou can use new PositionScore variable to decide which trades should be entered if there are more entry signals on different securities than maximum allowable number of open positions or available funds. In such case AmiBroker will use the absolute value of PositionScore variable to decide which trades are preferred. See the code below.
since positionScore takes the absolute value then -20 and +20 are treated the same and this is why adding 1000 helps since one will be 1020 and the other 980
and to be sure that you will take the positive number you need to specify that the positionscore should be >= 1000
i am not sure but what i think the moment you pass the position score line in rotational system the trade is already executed and you did not have the chance to specify that the ones that are less than 1000 ignore them or the ones that are in another universe should be ignored.
this is my opinion not sure if i am correct or wrong
SaidBitarMemberTrenRoth wrote:PositionScore = 1000+ROC();Hi
The problem with using 1000+ROC is that it will rank all of them as positive numbers and then you will take signals for stocks that have -ve ROC.I use for Ranking ROC() and then use conditions to filter out all negative and to add other conditions such as price filters, volume, ..
so it will look like this
Code:BuyTrigger = ROC(C,duration) > 0 AND IndexFilt AND OptFilt AND HDBFilter;
LE = Ref(BuyTrigger,-1);rank = Ref(ROC(C, duration),-1);
rank = iif(LE , rank , 0);
positionscore = rank;in this case you are making sure that all your conditions are satisfied
SaidBitarMemberQuote:Parameters are cached, as this is actually what this functionis meant to do, so this could happen if you:
– change DEFAULT value
– keep the same parameter name (text field remains unchanged).Sounds scary that the cache is not cleared all the time
Anyhow may be good exercise is to clear the cache manually (as described by Craig) from time to time just to be sure that the results and all the tests are accurate.SaidBitarMemberMonday 8/2
Parameter optimization on Momentum strategy
SaidBitarMemberAs expected i made the holy mistake and not found the holy grail
here is the mistake
Code:LE = Ref(BuySetUp,-1) AND NT==0 AND L >= Ref(StopBuyPrice,-1);and it should be
Code:LE = Ref(BuySetUp,-1) AND NT==0 AND H >= Ref(StopBuyPrice,-1);so by using the Low instead of the High i was only taking the trades that only moved upwards and that is why things were looking beautiful.
SaidBitarMembersample trade from SST
SaidBitarMemberSAT & SUN 6/2 7/2
Stress Test for one strategy and some optimization for the parameters (Found out that the result of the parameters that i use are better than the average so i started looking in my notes to see if i did optimize the parameters before) it will be good point to stop writing on papers or txt files and keep track for all inside the AFL file.
Finished reading the document that is shared by Nick Short Swing Trading interesting strategy so i coded it and start verifying the code and the results because the results were normal (CAR, MDD, % of winning trades) were falling in the normal range of most of strategies. then i changed the price limiters and the values rocketed up.
i should check everything again especially the code is bit trickySaidBitarMemberNo it is not only for you
i got it
the problem appears only in the debugger, in my opinion the reason is
the debugger is new feature so still there are bugs all over the place which is normalthe solution is to clear the cache how ?? still i have to check but normally this happen when the cache is not cleared. i tried to close and reopen Amibroker but did not help.
the good thing this issue is only in the debugger and not in the backtester or the interpretation
SaidBitarMembermay be a stop based on number of days will help, never tried it though but I notice that most of the times that the number of days in losers extend more than those in the winners
SaidBitarMemberHi
I tried with the same code and I did not have the problem.
SaidBitarMemberThursday 4/2/2016
Testing some ideas for swing trading. No good results yet actually all results were bad
Ideas are everywhere but when they are put to test few surviveregarding trading still all my index filters are down so no new trades. Holding one trade (OCLR) since 23/11/2015 in the last 3 days it went up more than 25%
SaidBitarMemberWED 3/2
fine tuned the momentum strategy
-
AuthorPosts