Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Code efficiency question
Collapse
X
-
I tested 1 startegy that called indicator that called another indicator.
Strategy with imbedded both indicators calculations was 2.5 times faster.
Comment
-
Well, the methodology.
1) Write 3 strategies (attached):
sCodeEfficiencyTestSmaExternal - calls SMA(200)
sCodeEfficiencyTestSmaImbeddedFast - calculates internaly only current value of SMA(200)
sCodeEfficiencyTestSmaImbeddedSlow - calculates internaly value of SMA(200) ant put it to internal DataSeries
2) Load CL minute chart from 01.01.2012 to 26.09.2012.
3) Disconnect NT from quotes provider.
4) Disconnect internet and close almost all programs, exept NT and notepad.
5) Run optimisation of each strategy (see screenshot):
chart: CL 1 mint from 01.01.2012 to 26.09.2012
optimize: variable Iteration from 1 to 1000, step 1
6) measure the time of each optimization by CASIO W-S200
Results:
3 minutes 08 seconds - sCodeEfficiencyTestSmaExternal
1 minutes 35 seconds - sCodeEfficiencyTestSmaImbeddedFast
6 minutes 11 seconds - sCodeEfficiencyTestSmaImbeddedSlowLast edited by fx.practic; 09-26-2012, 03:08 AM.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
166 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|
||
|
Started by CaptainJack, 04-24-2026, 11:07 PM
|
0 responses
320 views
0 likes
|
Last Post
by CaptainJack
04-24-2026, 11:07 PM
|
||
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
246 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
350 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
179 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|

Comment