Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
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.
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?
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?
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.
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.