NexusFi: Find Your Edge


Home Menu

 





Testing the BackTesting >> SIM


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Trader.Jon with 3 posts (0 thanks)
    2. looks_two Quick Summary with 1 posts (0 thanks)
    3. looks_3 raff with 1 posts (0 thanks)
    4. looks_4 Adamus with 1 posts (0 thanks)
    1. trending_up 3,654 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 5 posts
    2. attach_file 0 attachments




 
Search this Thread

Testing the BackTesting >> SIM

  #1 (permalink)
 
Trader.Jon's Avatar
 Trader.Jon 
Near the BEuTiFULL Horse Shoe
 
Experience: Beginner
Platform: NinjaTrader
Broker: MBTrading Dukascopy ZenFire
Trading: $EURUSD when it is trending
Posts: 473 since Jul 2009
Thanks Given: 401
Thanks Received: 184

Greets!

I have noticed an interesting 'effect' of comparing backtesting to SIM trades on the same days. At least to me.

While using Enter****Limit(), and the target limit price being the close (( Closes[0][0] )) of the trigger bar, I never seem to get an entry price at the open of the next bar IF the trigger bar is a down bar, but can get an entry at the open of the next bar if the trigger bar is an up bar or neutral bar.

I will be trying to code a test into a strategy to run against multiple currency pairs and comparing SIM <> BackTest on the same day data. I realize I can never expect results to be the same, but my observations by eyeball are too consistent to ignore.

I do feel that this, if correct, can have a bigger impact on trades than most any indicator you can use.

Any code gurus to help out? I am trying to make this a 'total' test including ouput to excel and analysis tools available within that (which is well beyond my skill level).

IF you think I am bullocks,,, tell me so!! lol

Jon

Writing to you from the wonderful province of Ontario, Canada. Home to the world's biggest natural negative ion generator, the Niagara Falls, and to those that dare to know how to go over it in a barrel. SALUTE!
Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Exit Strategy
NinjaTrader
PowerLanguage & EasyLanguage. How to get the platfor …
EasyLanguage Programming
Trade idea based off three indicators.
Traders Hideout
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
How to apply profiles
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
29 thanks
Tao te Trade: way of the WLD
24 thanks
Just another trading journal: PA, Wyckoff & Trends
24 thanks
Bigger Wins or Fewer Losses?
21 thanks
GFIs1 1 DAX trade per day journal
17 thanks
  #3 (permalink)
 raff 
Dublin, Ireland
 
Experience: Intermediate
Platform: NT
Posts: 5 since Nov 2009
Thanks Given: 18
Thanks Received: 0


Hi Jon,

I apologize for posting in this thread, but I couldn't find a thread for the Spread6 indicator and I couldn't send you a private message .

Great work on the Spread6 indicator.

But, I think there is an error in the code.


Quoting 

private double Spread6Calc(double price1, double q1, double price2, double q2, double price3, double q3, double price4, double q4, double price5, double q5, double price6, double q6)
{
if (UseMultiplier)
return
(price1 * Instruments[Instrument1].MasterInstrument.PointValue * q1)
+ (price2 * Instruments[Instrument2].MasterInstrument.PointValue * q2)
+ (price3 * Instruments[Instrument3].MasterInstrument.PointValue * q3)
+ (price4 * Instruments[Instrument4].MasterInstrument.PointValue * q4)
+ (price3 * Instruments[Instrument5].MasterInstrument.PointValue * q5)
+ (price4 * Instruments[Instrument6].MasterInstrument.PointValue * q6)

;
else
return
(price1 * q1)
+ (price2 * q2)
+ (price3 * q3)
+ (price4 * q4)
+ (price3 * q5)
+ (price4 * q6)

;
}

Should be Price5 , Price6 in the last 2 lines instead of Price3, Price4

Raff

Reply With Quote
  #4 (permalink)
 
Trader.Jon's Avatar
 Trader.Jon 
Near the BEuTiFULL Horse Shoe
 
Experience: Beginner
Platform: NinjaTrader
Broker: MBTrading Dukascopy ZenFire
Trading: $EURUSD when it is trending
Posts: 473 since Jul 2009
Thanks Given: 401
Thanks Received: 184


raff View Post
Hi Jon,

I apologize for posting in this thread, but I couldn't find a thread for the Spread6 indicator and I couldn't send you a private message .

Great work on the Spread6 indicator.

But, I think there is an error in the code.



Should be Price5 , Price6 in the last 2 lines instead of Price3, Price4

Raff

Very good eye! It has been awhile since I visited the code.

Jon

Writing to you from the wonderful province of Ontario, Canada. Home to the world's biggest natural negative ion generator, the Niagara Falls, and to those that dare to know how to go over it in a barrel. SALUTE!
Started this thread Reply With Quote
  #5 (permalink)
 
Adamus's Avatar
 Adamus 
London, UK
 
Experience: Beginner
Platform: NinjaTrader, home-grown Java
Broker: IB/IQFeed
Trading: EUR/USD
Posts: 1,085 since Dec 2010
Thanks Given: 471
Thanks Received: 789


Trader.Jon View Post
Greets!

I have noticed an interesting 'effect' of comparing backtesting to SIM trades on the same days. At least to me.

While using Enter****Limit(), and the target limit price being the close (( Closes[0][0] )) of the trigger bar, I never seem to get an entry price at the open of the next bar IF the trigger bar is a down bar, but can get an entry at the open of the next bar if the trigger bar is an up bar or neutral bar.

I will be trying to code a test into a strategy to run against multiple currency pairs and comparing SIM <> BackTest on the same day data. I realize I can never expect results to be the same, but my observations by eyeball are too consistent to ignore.

I do feel that this, if correct, can have a bigger impact on trades than most any indicator you can use.

Any code gurus to help out? I am trying to make this a 'total' test including ouput to excel and analysis tools available within that (which is well beyond my skill level).

IF you think I am bullocks,,, tell me so!! lol

Jon

I am an aspiring code guru, although I'm not there yet . What you say sounds like a serious bug in NinjaTrader. Is that what you meant?

Just to clarify, I think you are saying when you enter short at a limit using the closing price of the trigger bar, you never get an entry at the Open of the new bar.

Is that correct?

Even if the Open of the new bar is a tick down from the trigger bar Close?

You can discover what your enemy fears most by observing the means he uses to frighten you.
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #6 (permalink)
 
Trader.Jon's Avatar
 Trader.Jon 
Near the BEuTiFULL Horse Shoe
 
Experience: Beginner
Platform: NinjaTrader
Broker: MBTrading Dukascopy ZenFire
Trading: $EURUSD when it is trending
Posts: 473 since Jul 2009
Thanks Given: 401
Thanks Received: 184


Adamus View Post
I am an aspiring code guru, although I'm not there yet . What you say sounds like a serious bug in NinjaTrader. Is that what you meant?

Just to clarify, I think you are saying when you enter short at a limit using the closing price of the trigger bar, you never get an entry at the Open of the new bar.

Is that correct?

Even if the Open of the new bar is a tick down from the trigger bar Close?

That is correct, except I only use the Long ... except that the behavior is inconsistent .. ie market factors at work

Writing to you from the wonderful province of Ontario, Canada. Home to the world's biggest natural negative ion generator, the Niagara Falls, and to those that dare to know how to go over it in a barrel. SALUTE!
Started this thread Reply With Quote




Last Updated on March 25, 2011


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts