NexusFi: Find Your Edge


Home Menu

 





TradeStation Back-testing/Intra-bar Order Generation/Slippage


Discussion in TradeStation

Updated
    1. trending_up 4,079 views
    2. thumb_up 11 thanks given
    3. group 2 followers
    1. forum 13 posts
    2. attach_file 0 attachments




 
Search this Thread

TradeStation Back-testing/Intra-bar Order Generation/Slippage

  #11 (permalink)
highlyimprobable
ridgewood, NJ
 
Posts: 13 since Aug 2019
Thanks Given: 8
Thanks Received: 6


kevinkdog View Post
I could guess at what might be going on, but to really know I'd have to see the code in cases like this. (I'm not asking to see it, to be clear.)

The huge potential you see with IBOG is likely just tricks being played on the backtest engine. IN other words, not real.

Actually, I don't know why but the code was actually buy next bar at market, which I know now is a completely different scenario. Here is a simpler version of the code below anyways.
 
Code
FastMA = Average( FastPrice, FastLength );
MedMA = Average( MedPrice, MedLength );
SlowMA = Average( SlowPrice, SlowLength );

AveragesAlignedL = FastMA > MedMA and MedMA > SlowMA;

if CurrentBar > 15 and AveragesAlignedL and CurrentContracts = 0 then
	Buy numcontracts contracts next bar at market;
I know next bar at market is completely different from this bar on close, especially if you're trading on volatility, but it would still be great to learn your reasoning for the difference with backtesting.

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
New Micros: Ultra 10-Year & Ultra T-Bond -- Live Now
Treasury Notes and Bonds
Deepmoney LLM
Elite Quantitative GenAI/LLM
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
Are there any eval firms that allow you to sink to your …
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
38 thanks
NexusFi site changelog and issues/problem reporting
26 thanks
GFIs1 1 DAX trade per day journal
19 thanks
The Program
18 thanks
  #12 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,647 since Jul 2012
Thanks Given: 1,890
Thanks Received: 7,338


highlyimprobable View Post
Actually, I don't know why but the code was actually buy next bar at market, which I know now is a completely different scenario. Here is a simpler version of the code below anyways.
 
Code
FastMA = Average( FastPrice, FastLength );
MedMA = Average( MedPrice, MedLength );
SlowMA = Average( SlowPrice, SlowLength );

AveragesAlignedL = FastMA > MedMA and MedMA > SlowMA;

if CurrentBar > 15 and AveragesAlignedL and CurrentContracts = 0 then
	Buy numcontracts contracts next bar at market;
I know next bar at market is completely different from this bar on close, especially if you're trading on volatility, but it would still be great to learn your reasoning for the difference with backtesting.


Without IBOG on, this code when backtested will match live results very well. Just don;t forget to include slippage in backtest.

Follow me on Twitter Reply With Quote
Thanked by:
  #13 (permalink)
highlyimprobable
ridgewood, NJ
 
Posts: 13 since Aug 2019
Thanks Given: 8
Thanks Received: 6



kevinkdog View Post
Without IBOG on, this code when backtested will match live results very well. Just don;t forget to include slippage in backtest.

To be sure, you are saying that the 5 minute interval backtesting with the SMA with orders to buy next bar at market will match the live results? Or, the tick by tick?

Reply With Quote
  #14 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,647 since Jul 2012
Thanks Given: 1,890
Thanks Received: 7,338


highlyimprobable View Post
To be sure, you are saying that the 5 minute interval backtesting with the SMA with orders to buy next bar at market will match the live results? Or, the tick by tick?

The strategy you show (which is just an entry), with IBOG off, will show the same results as live with Look Inside Bar Backtesting off, or equal to 1 minute, or equal to 1 tick resolution.

But that could change depending on the exits you use...

Follow me on Twitter Reply With Quote
Thanked by:




Last Updated on September 3, 2019


© 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