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 tsantospinto, 04-12-2024, 07:04 PM
|
7 responses
126 views
0 likes
|
Last Post
by aligator
Today, 11:08 AM
|
||
Started by futtrader, 04-21-2024, 01:50 AM
|
5 responses
56 views
0 likes
|
Last Post Today, 10:57 AM | ||
Started by PeakTry, Today, 10:49 AM
|
0 responses
2 views
0 likes
|
Last Post
by PeakTry
Today, 10:49 AM
|
||
Started by llanqui, Today, 10:32 AM
|
0 responses
5 views
0 likes
|
Last Post
by llanqui
Today, 10:32 AM
|
||
Started by StockTrader88, 03-06-2021, 08:58 AM
|
45 responses
3,994 views
3 likes
|
Last Post Today, 09:51 AM |
Comment