NexusFi: Find Your Edge


Home Menu

 





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


Discussion in TradeStation

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




 
Search this Thread
  #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?
MC Advanced Simulated Trading.
MultiCharts
Elite Trader Funding, Avoid?
Funded Trading Evaluation Firms
Quantum physics & Trading dynamics
The Elite Circle
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
How to plot a custom icon for crossover
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
HumbleTraders next chapter
64 thanks
Tao te Trade: way of the WLD
45 thanks
ApexTraderFunding.com experience and review
26 thanks
1 Minute Man
21 thanks
What is Markets Chat (markets.chat) real-time trading ro …
21 thanks
  #12 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,668 since Jul 2012
Thanks Given: 1,893
Thanks Received: 7,378


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,668 since Jul 2012
Thanks Given: 1,893
Thanks Received: 7,378


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 - Sitemap - Downloads - Top
no new posts