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 CaptainJack, 05-29-2026, 05:09 AM
|
0 responses
256 views
0 likes
|
Last Post
by CaptainJack
05-29-2026, 05:09 AM
|
||
|
Started by CaptainJack, 05-29-2026, 12:02 AM
|
0 responses
166 views
0 likes
|
Last Post
by CaptainJack
05-29-2026, 12:02 AM
|
||
|
Started by charlesugo_1, 05-26-2026, 05:03 PM
|
0 responses
170 views
1 like
|
Last Post
by charlesugo_1
05-26-2026, 05:03 PM
|
||
|
Started by DannyP96, 05-18-2026, 02:38 PM
|
1 response
253 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
203 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|

Comment