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 Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
571 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
331 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
549 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
550 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment