NexusFi: Find Your Edge


Home Menu

 





Backtesting confusion


Discussion in NinjaTrader

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




 
Search this Thread
  #1 (permalink)
mastertrader31
Tallinn Estonia
 
Posts: 3 since Jun 2016
Thanks Given: 3
Thanks Received: 0

I am backtesting a sample strategy using vwap indicator. It basically buys es if close is above 3 points. Stops if stoploss is reached 8 points or Take profit is reached also 8 points. But my backtest shows what seems to me intrabar buying and stoping. How can I make it buy and sell on bar close?


Attached Files
Elite Membership required to download: vwapLong.cs
Elite Membership required to download: VitVWAP.cs
Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Iran and Israel Stand Down: What $9M in Peace Contracts …
Prediction Markets & Event Contracts
April CPI Preview: +3.7% YoY Expected at 8:30 AM ET -- C …
Traders Hideout
Irans Dual Probability: Guns Quiet at 99.95% While Forma …
Prediction Markets & Event Contracts
Warsh Opens Today, Hormuz June 19 -- WTI Below $80, Fran …
Prediction Markets & Event Contracts
Would a node-based workflow for automated trading be useful?
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
10 thanks
Darmok and Jalad at Tanagra
3 thanks
Big Mike in Ecuador
1 thanks
30 Sessions
1 thanks
  #2 (permalink)
 
rleplae's Avatar
 rleplae 
Gits (Hooglede) Belgium
Legendary Market Wizard
 
Experience: Master
Platform: NinjaTrader, Proprietary,
Broker: Ninjabrokerage/IQfeed + Synthetic datafeed
Trading: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
Posts: 2,947 since Sep 2013
Thanks Given: 2,442
Thanks Received: 5,855


mastertrader31 View Post
I am backtesting a sample strategy using vwap indicator. It basically buys es if close is above 3 points. Stops if stoploss is reached 8 points or Take profit is reached also 8 points. But my backtest shows what seems to me intrabar buying and stoping. How can I make it buy and sell on bar close?


try to run your strategy in 'replay' mode..
what does that give ?


Follow me on X Visit my NexusFi Trade Journal Reply With Quote
  #3 (permalink)
mastertrader31
Tallinn Estonia
 
Posts: 3 since Jun 2016
Thanks Given: 3
Thanks Received: 0


Sry about the delay. Had to learn market replay. So anyway I tested with it and it shows the same result. Seems like its closing on every tick not bar


Reply With Quote
  #4 (permalink)
 
NinjaTrader's Avatar
 NinjaTrader  NinjaTrader is an official Site Sponsor
Site Sponsor

Web: NinjaTrader
AMA: Ask Me Anything
Webinars: NinjaTrader Webinars
Elite offer: Click here
 
Posts: 1,715 since May 2010
Thanks Given: 203
Thanks Received: 2,689


mastertrader31 View Post
I am backtesting a sample strategy using vwap indicator. It basically buys es if close is above 3 points. Stops if stoploss is reached 8 points or Take profit is reached also 8 points. But my backtest shows what seems to me intrabar buying and stoping. How can I make it buy and sell on bar close?


At a quick glance, this can happen if your stops and profit targets are tight, within the range of the entry bar. NinjaTrader 8 has been improved in this area.


Follow me on X Reply With Quote




Last Updated on September 9, 2016


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