NexusFi: Find Your Edge


Home Menu

 





Strategy Trade Bars


Discussion in NinjaTrader

Updated
    1. trending_up 3,936 views
    2. thumb_up 5 thanks given
    3. group 2 followers
    1. forum 11 posts
    2. attach_file 2 attachments




 
Search this Thread

Strategy Trade Bars

  #1 (permalink)
zaico
Barcelona Spain
 
Posts: 26 since Sep 2016
Thanks Given: 6
Thanks Received: 4

Is there something to take in to account if my strategy trades are made mainly in 1 bar?

I mean, if it was real life (not backtesting) those orders will be fill If automated?

Thanks

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Are there any eval firms that allow you to sink to your …
Traders Hideout
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
Deepmoney LLM
Elite Quantitative GenAI/LLM
Better Renko Gaps
The Elite Circle
ZombieSqueeze
Platforms and Indicators
 
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
39 thanks
NexusFi site changelog and issues/problem reporting
26 thanks
The Program
18 thanks
GFIs1 1 DAX trade per day journal
18 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: 3,003 since Sep 2013
Thanks Given: 2,442
Thanks Received: 5,863


zaico View Post
Is there something to take in to account if my strategy trades are made mainly in 1 bar?

I mean, if it was real life (not backtesting) those orders will be fill If automated?

Thanks

Your questions breaks into a number of questions

1. if you create an ATM strategy, then it is important how you code your entry
if the piece of code is written in such a way, that you check at the close of a bar
then you could only get a fill in the next bar if the price hits your entry

2. if you have a profit target and or S/L order in the market, then one of those
limits will be filled, even if your strategy code only works on bar close, but you
may consider also running parts of your strategy, if you desire a higher granularity
control over your order

In short

OnBarUpdate () -> executes when the bar is formed
OnMarketUpdate () -> executes on every tick in the market

So you have control yourself, it depends how you write your code.

Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #3 (permalink)
zaico
Barcelona Spain
 
Posts: 26 since Sep 2016
Thanks Given: 6
Thanks Received: 4


My strategy is basic, based on checking a chart pattern. So I assume this must be OnBarUpdate. Then if the pattern is found I set a limit entry and a stop loss if the entry is filled. In this case, reading your answer I understand OnBarUpdate is enough. Correct?

Reply With Quote
  #4 (permalink)
zaico
Barcelona Spain
 
Posts: 26 since Sep 2016
Thanks Given: 6
Thanks Received: 4

Are things like this that worry me. It it possible in real life what you see on the photo?

Reply With Quote
  #5 (permalink)
 
xplorer's Avatar
 xplorer 
London UK
Site Moderator
 
Experience: Beginner
Platform: CQG
Broker: S5
Trading: Futures
Posts: 5,944 since Sep 2015
Thanks Given: 15,447
Thanks Received: 15,291


zaico View Post
Are things like this that worry me. It it possible in real life what you see on the photo?

What exactly are you wondering about whether it's possible?

Also, there's no timeframe in the pic.

Reply With Quote
  #6 (permalink)
zaico
Barcelona Spain
 
Posts: 26 since Sep 2016
Thanks Given: 6
Thanks Received: 4


xplorer View Post
What exactly are you wondering about whether it's possible?

Also, there's no time frame in the pic.

You are right sorry. Here is one with the time frame. I ask if its possible for a down bar on a backtest to have the long entry down and the stop profit at the top? I understand the bottom part, where the buy is, is the last to be made. So I assume it can't happen. Correct?


Reply With Quote
Thanked by:
  #7 (permalink)
 
xplorer's Avatar
 xplorer 
London UK
Site Moderator
 
Experience: Beginner
Platform: CQG
Broker: S5
Trading: Futures
Posts: 5,944 since Sep 2015
Thanks Given: 15,447
Thanks Received: 15,291


zaico View Post
You are right sorry. Here is one with the time frame. I ask if its possible for a down bar on a backtest to have the long entry down and the stop profit at the top? I understand the bottom part, where the buy is, is the last to be made. So I assume it can't happen. Correct?


Well, difficult for me to say, depends on what triggers the strategy I think?


Your reasoning is correct in that the red bar is supposed to be a down bar which opens at the top and closes at the bottom, but without knowing how that specific minute went and not knowing the strategy's logic I'd say it's hard to come to a conclusion.

Are you able to break that minute into smaller bars? E.g. a non-time-based bar?

Reply With Quote
  #8 (permalink)
zaico
Barcelona Spain
 
Posts: 26 since Sep 2016
Thanks Given: 6
Thanks Received: 4


xplorer View Post
Well, difficult for me to say, depends on what triggers the strategy I think?


Your reasoning is correct in that the red bar is supposed to be a down bar which opens at the top and closes at the bottom, but without knowing how that specific minute went and not knowing the strategy's logic I'd say it's hard to come to a conclusion.

Are you able to break that minute into smaller bars? E.g. a non-time-based bar?

Can't find a way to use non-time-based bar on backtesting bar. Is there any?

Reply With Quote
  #9 (permalink)
 
xplorer's Avatar
 xplorer 
London UK
Site Moderator
 
Experience: Beginner
Platform: CQG
Broker: S5
Trading: Futures
Posts: 5,944 since Sep 2015
Thanks Given: 15,447
Thanks Received: 15,291


zaico View Post
Can't find a way to use non-time-based bar on backtesting bar. Is there any?

I don't know but the way to find out what happened is to use the non-time bars and take a snapshot at that period in time. No need to worry about backtesting.

At least this way you can tell whether price went straight down or went down, then up, then down.


Then you need to validate what triggers the strategy would have operated on.


Does it make sense?

Reply With Quote
  #10 (permalink)
zaico
Barcelona Spain
 
Posts: 26 since Sep 2016
Thanks Given: 6
Thanks Received: 4


I understand, but the thing is I can only access to that time through backtesting because it's a demo account. Anyway I'll try If there's a time frame I can access with the current contract data.

Can you give some clue on how to use non-time bars. I've read something but I don't get anything clear.

thanks agains

Reply With Quote
Thanked by:




Last Updated on December 8, 2016


© 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