NexusFi: Find Your Edge


Home Menu

 





Can Ninjatrader perform autotrading without problems?


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one traderwerks with 7 posts (1 thanks)
    2. looks_two baruchs with 5 posts (1 thanks)
    3. looks_3 MWinfrey with 4 posts (1 thanks)
    4. looks_4 fluxsmith with 3 posts (0 thanks)
      Best Posters
    1. looks_one Trader.Jon with 1.5 thanks per post
    2. looks_two redratsal with 1 thanks per post
    3. looks_3 MWinfrey with 0.3 thanks per post
    4. looks_4 baruchs with 0.2 thanks per post
    1. trending_up 10,276 views
    2. thumb_up 8 thanks given
    3. group 7 followers
    1. forum 26 posts
    2. attach_file 2 attachments




 
Search this Thread

Can Ninjatrader perform autotrading without problems?

  #21 (permalink)
 
MWinfrey's Avatar
 MWinfrey 
Lubbock TX
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Stage 5 Trading
Trading: CL
Posts: 1,878 since Jul 2009
Thanks Given: 1,450
Thanks Received: 3,335


traderwerks View Post
Here is an example. This was a 6J trade I took. I used a limit if touched entry. touch 979, entry long 978. The stop was sent at 975 (IIRC) which was never hit in real life. I entered at 978 and exited at 982 for a 4 tick scalp.

If I was backtesting, the system would have entered at 978 and been stopped out at 975 for a 4 tick loss ( added 1 tick for the Market order exit ).

I can't tell from your post but was it a 4 tick loss in backtesting because it exited on the same bar as the entry. If so, that can be fixed by checking to make sure CurrentBar != entryBar;

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Better Renko Gaps
The Elite Circle
Increase in trading performance by 75%
The Elite Circle
MC PL editor upgrade
MultiCharts
Exit Strategy
NinjaTrader
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
34 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
19 thanks
GFIs1 1 DAX trade per day journal
16 thanks
Vinny E-Mini & Algobox Review TRADE ROOM
13 thanks
  #22 (permalink)
 baruchs 
Israel
 
Experience: Intermediate
Platform: NinjaTrader
Broker: pfg
Trading: eminis
Posts: 323 since Jun 2009


Quoting 
If I was [COLOR=#0000ff]backtesting[/COLOR], the system would have entered at 978 and been stopped out at 975 for a 4 tick loss ( added 1 tick for the [COLOR=#0000ff]Market order[/COLOR] exit ).

I want to emphasize that backtesting is the most important aspect in strategy development. Of course you need to understand how to do it properly. In your example you need a tick data series for the execution.
If done correctly backtesting will be exactly as replay and live trading.

Baruch

Reply With Quote
  #23 (permalink)
 
MWinfrey's Avatar
 MWinfrey 
Lubbock TX
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Stage 5 Trading
Trading: CL
Posts: 1,878 since Jul 2009
Thanks Given: 1,450
Thanks Received: 3,335



baruchs View Post
Can you explain? I think that if you write the strategy correctly it should give the same results in BT and replay.

Baruch

I agree that aside from slippage, the strategy should be the same in BT, replay, and live. However, there are bar types that cause problems and don't backtest the same as replay and live. The NT provided renko and linebreak bartypes are 2. Other issues that can cause problems with BT are any tick based bartype may not be the same at times because of timestamp issues. From what I understand tick data doesn't have timestamps until they are written to the historic data server. So, those timestamps are artificial in a sense. At times, they are wrong and cause your BT orders to show up in different locations on your chart that aren't even close to the right place. I was using the Viper system at one time and their strategies were built for either volume or tick data, can't remember which. They were horrible. I'd have trades that didn't even show up in backtesting but were there in live and vice versa.

Couple other things to consider is that your default session needs to have a definite end time like 11:59 PM. That way a bar that is in progress at 11:59 PM will be terminated at 11:59 and a new bar will start each day. This solves the problem of looking at a chart one day, seeing an entry at a specific time and going back to that entry tomorrow or any other time in the future and that same entry isn't there. That's because you start your chart from a different day each time you look at it. Therefore your first bar is different causing every bar after that to be different from when you first looked at that pattern. So by having your session start over each day the way I described, you are forcing your backfill data to be the same every time. Much better chance of having those patterns the same from day to day whether you have 1 day or backfill data or 100.

You really must sync your computer time with an atomic clock every day. I use a free utility called Abouttime. https://arachnoid.com/abouttime. I've used it for years and never worry about it. Works well.

There are other issues as well but I can't seem to remember them right now. I'll add to this post if I remember.

I have to say BetterRenko works perfectly. Just had to give a plug to aslan who wrote the BR.

Reply With Quote
Thanked by:
  #24 (permalink)
 traderwerks   is a Vendor
 
Posts: 692 since Jun 2009
Thanks Given: 436
Thanks Received: 465


MWinfrey View Post
I can't tell from your post but was it a 4 tick loss in backtesting because it exited on the same bar as the entry. If so, that can be fixed by checking to make sure CurrentBar != entryBar;

It often does exit the same bar.

I don't have a problem , my systems are working fine, I just gave an example.

Math. A gateway drug to reality.
Reply With Quote
  #25 (permalink)
 traderwerks   is a Vendor
 
Posts: 692 since Jun 2009
Thanks Given: 436
Thanks Received: 465


baruchs View Post
I want to emphasize that backtesting is the most important aspect in strategy development. Of course you need to understand how to do it properly. In your example you need a tick data series for the execution.
If done correctly backtesting will be exactly as replay and live trading.

Baruch

Ok. I do my 'system' design outside of ninja before I start coding. But to each his/her own.

Math. A gateway drug to reality.
Reply With Quote
  #26 (permalink)
 traderwerks   is a Vendor
 
Posts: 692 since Jun 2009
Thanks Given: 436
Thanks Received: 465


baruchs View Post
If done correctly backtesting will be exactly as replay and live trading.
Baruch

No. You will always have implementation error ( positive or negative ), especially with a retail platform.

Math. A gateway drug to reality.
Reply With Quote
Thanked by:
  #27 (permalink)
 
MWinfrey's Avatar
 MWinfrey 
Lubbock TX
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Stage 5 Trading
Trading: CL
Posts: 1,878 since Jul 2009
Thanks Given: 1,450
Thanks Received: 3,335


baruchs View Post
I want to emphasize that backtesting is the most important aspect in strategy development. Of course you need to understand how to do it properly. In your example you need a tick data series for the execution.
If done correctly backtesting will be exactly as replay and live trading.

Baruch


Could you elaborate on what "correctly" is? According to you comment you must have something specific you can give us as opposed to all of us going back and forth on what can and can't be done.

Reply With Quote




Last Updated on February 7, 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