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 cmoran13, 04-16-2026, 01:02 PM
|
0 responses
37 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
23 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|
||
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
162 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
98 views
1 like
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
152 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|

Comment