- Joined
- 13 September 2013
- Posts
- 988
- Reactions
- 531
Okay I will show the sequence I took.
1. run exploration XKO after close on 16/06/2016 (note not before this time and no trades before)
2. result is a list of stocks that met the 3 lower lows, close above ma(100) and close below ma(5) (is that bit confusing?)
3. calculate the limit order price of c - 0.5 * atr(10) to buy today 17/06/2016
3. posted stock list with their limit orders on forum
1) It is the limit order that doesn't back test true in my opinion as it buys the low often and we know that isn't possible.[/B]
Okay I will show the sequence I took.
1. run exploration XKO after close on 16/06/2016 (note not before this time and no trades before)
2. result is a list of stocks that met the 3 lower lows, close above ma(100) and close below ma(5) (is that bit confusing?)
3. calculate the limit order price of c - 0.5 * atr(10) to buy today 17/06/2016
3. posted stock list with their limit orders on forum
But if you run an exploration today do you get a buy signal for MIN again even though you bought it today?
LOL ...I know what you did and it wasn't achievable in real life. Is that a bit confusing?
Of course because it meets the rules. The exploration will result only the stocks that meet the rules. LNK did too.
View attachment 67135
Capital available would limit buying capability but ExRem would remove excess signals in the code. Not sure what the ExRem process is though. Maybe alphabetical elimination.You need to include some code to remove additional buy signals once you have entered a trade that hasn't exited.
Capital available would limit buying capability but ExRem would remove excess signals in the code. Not sure what the ExRem process is though. Maybe alphabetical elimination.
My strategies tell me the following in sequence for each trade:
Buy signal (I should buy tomorrow)
Entry (I bought today)
Hold
Sell Signal (I should sell tomorrow)
Sell (I sold today)
If you are going to backtest this system you will need to include in your code a test to ensure the limit price is achievable on the buy day.
eg
SetTradeDelays(0,1,0,0);
Setup = BuyRule1 & BuyRule2 & BuyRule3 & Turnover;
Buy = Ref(Setup,-1) AND L <= Ref(C-ATR(10)*0.5,-1);
BuyPrice =Min(O,Ref(C-ATR(10)*0.5,-1));
Yes that is a better back test procedure. Thank you.
Where are you at with your test positions Wysiwyg?
So today the trades that met the criteria. Will post the exit price (next day open price) of these 4 when their c > ref(c, -1). STO gets sold on Monday open price.
1. TWE = no buy
2. STO = buy at $4.16
3. PRY = no buy
4. MIN = buy at $8.135
5. LNK = buy at $8.14
6. CAR = no buy
7. BPT = buy at $0.62
2. STO c > ref(c, -1) = sell at open price next day 20/06 @ $4.43 for Gain of 6.49%
4. MIN c > ref(c, -1) = sell at open price next day 21/06 @ $8.60 for Gain of 5.72%
5. LNK c > ref(c, -1) = sell at open price next day 21/06 @ $8.22 for Gain of 0.98%
7. BPT c > ref(c, -1) = sell at open price next day 21/06 @ $0.67 for Gain of 8.06%
Fantastic results for a short hold but a 1.6% Index rise following entry day made a big difference. 1.6% Index down day and the results would be very different. Looking at it objectively of course.
I sold everything I had at yesterdays close.
Yeh i didn't place any new orders just held existing positions.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?