Home › Forums › Trading System Mentor Course Community › Trading System Brainstorming › Keltner Day Trade Strategy
- This topic is empty.
-
AuthorPosts
-
April 12, 2023 at 7:58 am #102269Nick RadgeKeymaster
(1) Take the ATR of last 5 days.
(2) Take the standard deviation of (1) for 50 days, and divide that by the standard deviation of the last 200 days
(3) If less than 5, then buy limit tomorrow at todays low minus (1) x 0.5
(4) Exit a close
(5) Apply to all stocks in US in an uptrend, above $20 and with t/o > $300kApril 13, 2023 at 7:52 am #115541KateMoloneyParticipantThank you for sharing.
My first attempt produced a 38% ROR with a -57% maxDD.
The maxDD was in 2008. Last year produced a 120% return.
April 13, 2023 at 10:38 pm #115548KateMoloneyParticipantSecond attempt more on the money.
Thanks to Glen for the help.
This weekends job is to learn the scan function on RT so I can pick up the errors myself.
April 14, 2023 at 4:44 am #115550ScottBiltonMemberHi Kate, I’m getting hit in 2022 which whacks the MAR from over 2 down to sub 1.0
Can you share some of your learnings from Glen? And what do you mean about spotting errors?
April 14, 2023 at 5:01 am #115551KateMoloneyParticipantCancel my last comment Scott. Still trying to figure out if we interpreted the rules correctly.
The equity curve looks nothing like Nicks.
April 14, 2023 at 5:05 am #115552KateMoloneyParticipantJust to clarify, I put input one of the rules incorrectly. My version is till a WIP.
Glen showed me how to do a scan to pick up my error. Only 4 weeks into my RT learning journey…..
Where are you stuck?
April 14, 2023 at 6:08 am #115542JulianCohenParticipantI don’t use the scan section very much..
Would you like to give us an idea about how you are using it to spot errors?
April 14, 2023 at 8:01 am #115553Nick RadgeKeymasterMyATR: ATR(5)
MyMA: MA(C,5)
Uptrend: C > MA(C,200)
ShortScore: 100 + PctChg(C,3)
LongScore: 100 – PctChg(C,3)
Liquid: MA(V, 50)
Fast_ATR: ATR(15)
Slow_ATR: ATR(30)
ShortLimit: C + MyATR * Stretch
LongLimit: C – MyATR * Stretch
ShortTrigger: C > (MyMA + 1 * MyATR)
LongTrigger: C < (MyMA - 1 * MyATR)
ShortSetup: InRUI and Uptrend and ShortTrigger and C > 20 and Liquid > 500000
LongSetup: InRUI and Uptrend and LongTrigger and C > 20 and Liquid > 500000April 14, 2023 at 8:55 am #115554ScottBiltonMemberThanks for info Nick, but are you giving details for a different strategy than originally posted?
best so far is a MAR of 1.0, but I was using the total market.April 14, 2023 at 9:38 am #115555KateMoloneyParticipantJulian Cohen post=13972 userid=5314 wrote:I don’t use the scan section very much..Would you like to give us an idea about how you are using it to spot errors?
(1) Take the ATR of last 5 days.
(2) Take the standard deviation of (1) for 50 days, and divide that by the standard deviation of the last 200 days
(3) If less than 5, then buy limit tomorrow at todays low minus (1) x 0.5
(4) Exit a close
(5) Apply to all stocks in US in an uptrend, above $20 and with t/o > $300kI may have misunderstood the rules, but I coded up the SD of 50 days, not the SD of the ATR.
The scan function ran the calculations and it was noted from the scan that no calculation (3) ran above 5, so rule 3 was essentially invalid on my version, but it did work at .5These exercises have been great from the perspective of critical thinking and using RT to pull apart a strategy.
Apart from that, I’m very reluctant trusting random trading gurus & the strategies they post on the internet
April 14, 2023 at 10:11 am #115543BenOsbornParticipantNoting that my results don’t match Nick’s (except for the benchmark ), this is how I coded it:
Data:
Liquid: C > 20 and Avg(C*V, 50) >= 300000
ATR5: ATR(5)
Sdev50: StdDev(ATR5, 50)
Sdev200: StdDev(ATR5, 200)
SdevCalc: Sdev50/Sdev200
Uptrend: C > MA(C,200)
Longset: Uptrend and Liquid and SdevCalc < 5
Ranking: 100 – ROC(c,3)
LimPrice: L – 0.5 * ATR5CAGR 56% DD 52%. Max DD was only in mid 20s until 2022 when it got creamed.
I don’t use scan but changed the rules to SdevCalc > 5 and got no trades, so this rule isn’t having an effect for me either.
April 14, 2023 at 11:01 am #115557GlenPeakeParticipantHi Ben,
So I saw similar to you…. using the Data inputs you posted, if you add the following to your Script and run a SCAN and note the values for the Standard Deviation (SDValue) column you’ll see that all stocks in the universe are all below 5.
/////////////////////////////////////////////////////
ScanSettings:
DataFile: DataDayTrade1000.rtd // Change to your Data File
EndDate: Latest
NumDays: 1
Scan:
Filter: 1
Ranking1: {#8} Ranking
ClosePrice: {$} Close
VolumeToday: VolumeSort: -Ranking1
// BuyLimitPrice: {$} Limit
SDValue: SdevCalc/////////////////////////////////////////////////////
Additionally you can also use the DEBUG Panel and paste your code “Sdev50/Sdev200” into the Formula field and hit Evaluate (tick Show Evaluation) and see the formula broken down etc.
Symbol: TSLA
BarSize: Daily
Date: 12/4/23
Formula: Sdev50/Sdev200
Evaluation:
Sdev50 = 1.54
Sdev200 = 1.95
(1.54 / 1.95) = 0.790576Result: 0.7906 (0.790576080102531)
Additionally, you can paste the following and get a full break down as to what the formula is doing: StdDev(ATR5, 50)/StdDev(ATR5, 200)
Symbol: TSLA
BarSize: Daily
Date: 12/4/23
Formula: StdDev(ATR5, 50)/StdDev(ATR5, 200)
Evaluation:
ATR5 = 8.63
ATR5[1] = 7.97
ATR5[2] = 8.79
ATR5[3] = 8.74
ATR5[4] = 9.27
ATR5[5] = 9.38
ATR5[6] = 9.62
ATR5[7] = 8.21
ATR5[8] = 7.13
ATR5[9] = 8.05
ATR5[10] = 8.54
ATR5[11] = 8.95
ATR5[12] = 9.32
ATR5[13] = 10.35
ATR5[14] = 10.27
ATR5[15] = 10.41
ATR5[16] = 9.33
ATR5[17] = 9.14
ATR5[18] = 9.20
ATR5[19] = 9.76
ATR5[20] = 10.39
ATR5[21] = 10.66
ATR5[22] = 9.97
ATR5[23] = 10.00
ATR5[24] = 9.33
ATR5[25] = 9.74
ATR5[26] = 10.14
ATR5[27] = 11.11
ATR5[28] = 11.49
ATR5[29] = 10.17
ATR5[30] = 10.54
ATR5[31] = 11.31
ATR5[32] = 11.00
ATR5[33] = 11.43
ATR5[34] = 12.09
ATR5[35] = 12.56
ATR5[36] = 12.57
ATR5[37] = 12.98
ATR5[38] = 12.27
ATR5[39] = 13.20
ATR5[40] = 11.41
ATR5[41] = 11.94
ATR5[42] = 11.32
ATR5[43] = 10.97
ATR5[44] = 11.54
ATR5[45] = 12.44
ATR5[46] = 13.49
ATR5[47] = 13.03
ATR5[48] = 12.46
ATR5[49] = 12.10
StdDev(12.10, 50) = 1.54
ATR5 = 8.63
ATR5[1] = 7.97
ATR5[2] = 8.79
ATR5[3] = 8.74
ATR5[4] = 9.27
ATR5[5] = 9.38
ATR5[6] = 9.62
ATR5[7] = 8.21
ATR5[8] = 7.13
ATR5[9] = 8.05
ATR5[10] = 8.54
ATR5[11] = 8.95
ATR5[12] = 9.32
ATR5[13] = 10.35
ATR5[14] = 10.27
ATR5[15] = 10.41
ATR5[16] = 9.33
ATR5[17] = 9.14
ATR5[18] = 9.20
ATR5[19] = 9.76
ATR5[20] = 10.39
ATR5[21] = 10.66
ATR5[22] = 9.97
ATR5[23] = 10.00
ATR5[24] = 9.33
ATR5[25] = 9.74
ATR5[26] = 10.14
ATR5[27] = 11.11
ATR5[28] = 11.49
ATR5[29] = 10.17
ATR5[30] = 10.54
ATR5[31] = 11.31
ATR5[32] = 11.00
ATR5[33] = 11.43
ATR5[34] = 12.09
ATR5[35] = 12.56
ATR5[36] = 12.57
ATR5[37] = 12.98
ATR5[38] = 12.27
ATR5[39] = 13.20
ATR5[40] = 11.41
ATR5[41] = 11.94
ATR5[42] = 11.32
ATR5[43] = 10.97
ATR5[44] = 11.54
ATR5[45] = 12.44
ATR5[46] = 13.49
ATR5[47] = 13.03
ATR5[48] = 12.46
ATR5[49] = 12.10
ATR5[50] = 12.25
ATR5[51] = 11.99
ATR5[52] = 9.88
ATR5[53] = 8.11
ATR5[54] = 8.05
ATR5[55] = 8.71
ATR5[56] = 7.90
ATR5[57] = 8.29
ATR5[58] = 8.94
ATR5[59] = 8.76
ATR5[60] = 8.62
ATR5[61] = 8.79
ATR5[62] = 9.21
ATR5[63] = 9.73
ATR5[64] = 10.21
ATR5[65] = 10.14
ATR5[66] = 9.53
ATR5[67] = 10.30
ATR5[68] = 11.10
ATR5[69] = 9.24
ATR5[70] = 10.37
ATR5[71] = 10.25
ATR5[72] = 10.80
ATR5[73] = 9.90
ATR5[74] = 10.48
ATR5[75] = 9.27
ATR5[76] = 10.25
ATR5[77] = 9.76
ATR5[78] = 9.84
ATR5[79] = 9.57
ATR5[80] = 10.05
ATR5[81] = 10.98
ATR5[82] = 9.19
ATR5[83] = 8.61
ATR5[84] = 8.47
ATR5[85] = 9.05
ATR5[86] = 9.42
ATR5[87] = 9.69
ATR5[88] = 8.54
ATR5[89] = 9.39
ATR5[90] = 9.96
ATR5[91] = 8.91
ATR5[92] = 9.23
ATR5[93] = 9.16
ATR5[94] = 10.31
ATR5[95] = 9.46
ATR5[96] = 10.65
ATR5[97] = 10.15
ATR5[98] = 10.52
ATR5[99] = 11.65
ATR5[100] = 12.37
ATR5[101] = 12.99
ATR5[102] = 13.83
ATR5[103] = 13.81
ATR5[104] = 13.91
ATR5[105] = 12.69
ATR5[106] = 13.28
ATR5[107] = 13.55
ATR5[108] = 11.75
ATR5[109] = 11.92
ATR5[110] = 11.64
ATR5[111] = 12.03
ATR5[112] = 13.05
ATR5[113] = 13.19
ATR5[114] = 13.75
ATR5[115] = 14.09
ATR5[116] = 14.02
ATR5[117] = 13.56
ATR5[118] = 14.24
ATR5[119] = 12.78
ATR5[120] = 14.69
ATR5[121] = 15.22
ATR5[122] = 14.81
ATR5[123] = 12.99
ATR5[124] = 12.05
ATR5[125] = 13.11
ATR5[126] = 13.70
ATR5[127] = 14.97
ATR5[128] = 14.68
ATR5[129] = 16.04
ATR5[130] = 16.01
ATR5[131] = 16.14
ATR5[132] = 14.12
ATR5[133] = 14.38
ATR5[134] = 12.46
ATR5[135] = 12.72
ATR5[136] = 12.74
ATR5[137] = 12.47
ATR5[138] = 11.65
ATR5[139] = 10.70
ATR5[140] = 10.08
ATR5[141] = 10.66
ATR5[142] = 10.31
ATR5[143] = 10.85
ATR5[144] = 11.47
ATR5[145] = 10.75
ATR5[146] = 9.93
ATR5[147] = 10.96
ATR5[148] = 11.05
ATR5[149] = 11.37
ATR5[150] = 11.33
ATR5[151] = 11.60
ATR5[152] = 11.18
ATR5[153] = 11.11
ATR5[154] = 11.53
ATR5[155] = 10.46
ATR5[156] = 11.22
ATR5[157] = 10.40
ATR5[158] = 10.16
ATR5[159] = 10.90
ATR5[160] = 10.89
ATR5[161] = 11.03
ATR5[162] = 11.19
ATR5[163] = 12.83
ATR5[164] = 13.63
ATR5[165] = 14.09
ATR5[166] = 14.33
ATR5[167] = 14.13
ATR5[168] = 14.57
ATR5[169] = 14.66
ATR5[170] = 15.07
ATR5[171] = 14.58
ATR5[172] = 12.45
ATR5[173] = 13.41
ATR5[174] = 14.52
ATR5[175] = 14.36
ATR5[176] = 13.73
ATR5[177] = 12.36
ATR5[178] = 12.82
ATR5[179] = 11.76
ATR5[180] = 11.66
ATR5[181] = 12.89
ATR5[182] = 13.59
ATR5[183] = 10.55
ATR5[184] = 11.39
ATR5[185] = 11.70
ATR5[186] = 11.89
ATR5[187] = 13.18
ATR5[188] = 14.15
ATR5[189] = 13.43
ATR5[190] = 13.93
ATR5[191] = 12.55
ATR5[192] = 12.24
ATR5[193] = 11.89
ATR5[194] = 13.02
ATR5[195] = 12.03
ATR5[196] = 13.01
ATR5[197] = 13.61
ATR5[198] = 14.42
ATR5[199] = 13.61
StdDev(13.61, 200) = 1.95
(1.54 / 1.95) = 0.790576Result: 0.7906 (0.790576080102531)
April 14, 2023 at 11:20 am #115558JulianCohenParticipantOK got the idea of the scan
I actually use the Debug panel and often look at 200 days data to see what the script is calculating each data point to be
April 14, 2023 at 11:28 am #115559BenOsbornParticipantThanks Glen, that’s pretty handy. I hadn’t played with Scan before.
April 14, 2023 at 12:03 pm #115544BenOsbornParticipant -
AuthorPosts
- You must be logged in to reply to this topic.