thanks
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Strategy Analyzer Optimization
Collapse
X
-
Strategy Analyzer Optimization
I'm getting results when testing the SampleMA strategy, but not getting any results from my custom strat with parameters. I have a feeling that its because i have my params set in OnMarketData(MarketDataEventArgs e) rather than OnBarUpdate(), but would like to confirm this before making any changes.
thanksTags: None
-
-
ok, i added a second timeframe.
Print(Times[1][0].ToString());
ok now i just retested the Strategy Optimizer and still getting no results. i have a feeling now maybe it is because i am using the bid and ask volumes; the instrument is forex EURUSD. but i am not sure, can you confirm? and if so how to proceed? i appreciate your help in migrating my code and getting it ready for optimization.Last edited by dargente; 02-22-2011, 12:09 AM.
Comment
-
Bertrand, i have added the following:
Add(PeriodType.Tick, 1);
Add("$EURUSD", PeriodType.Tick, 1, MarketDataType.Bid);
Add("$EURUSD", PeriodType.Tick, 1, MarketDataType.Ask);
bidPrice = Closes[2][0];
bidVolume = Volumes[2][0];
askPrice = Closes[3][0];
askVolume = Volumes[3][0];
fyi, volume here is a double, whereas elsewhere it was changed to a long data type for NT7. just wanted to bring that up.
i have added BarsInProgress for retrieving prices and volumes. the strategy is now functioning properly. what else am i missing because i am still getting no results on the back-test?Last edited by dargente; 02-22-2011, 02:50 AM.
Comment
-
ok, i am able to see some trades in the back-testing now, but there is definitely a problem with the synching of bids and asks on every tick. My strategy is dependent on these and respective volumes, but I'm not getting a true time and sales:
Code:if(BarsInProgress == 2 || BarsInProgress == 3) { bidPrice = Closes[2][0]; bidVolume = Volumes[2][0]; askPrice = Closes[3][0]; askVolume = Volumes[3][0]; Print(Times[1][0].ToString() + " BID: " + bidVolume + " " + bidPrice + " " + askPrice + " " + askVolume + " :ASK "); }
Comment
-
can you clarify which below is causing the 1 second granularity?
- OnBarUpdate() ?
- Add("$EURUSD", PeriodType.Tick, 1, MarketDataType.Bid/Ask)?
and/or
- BackTesting ?
Note that there are problems even before back-testing.
Also, using OnMarketData(MarketDataEventArgs e) i am able to get a true tape-reading but not able to backtest/optimize, hence this thread.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by rbeckmann05, Yesterday, 06:48 PM
|
1 response
12 views
0 likes
|
Last Post
by bltdavid
Today, 05:43 AM
|
||
Started by llanqui, Today, 03:53 AM
|
0 responses
6 views
0 likes
|
Last Post
by llanqui
Today, 03:53 AM
|
||
Started by burtoninlondon, Today, 12:38 AM
|
0 responses
10 views
0 likes
|
Last Post Today, 12:38 AM | ||
Started by AaronKoRn, Yesterday, 09:49 PM
|
0 responses
15 views
0 likes
|
Last Post
by AaronKoRn
Yesterday, 09:49 PM
|
||
Started by carnitron, Yesterday, 08:42 PM
|
0 responses
11 views
0 likes
|
Last Post
by carnitron
Yesterday, 08:42 PM
|
Comment