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)
I am just a beginner programming codes and I need some help.
As you can see in jpeg attached, I have created a very simple strategy.
DeltaHigh of a bar > 75, then EntryShortLimit + 4 ticks in next bar
DeltaLow of a bar < -75, then EntryLongLimit - 4 ticks in next bar
But orders are launched one bar later instead just the bar after the conditions are met.
Can somebody please have a look at the strategy file zip and tell me what line of code is wrong and what is the right way?
Thanks a lot
Can you help answer these questions from other members on NexusFi?
From what I understood from that is to meet the condition bar needs to close, then only the system registers it as a "bar" and tallies the condition.
Basically your conditions won't be complete till bar is closed and naturally your response (order) for condition meeting will be on the next bar from the one where your condition has met.
/Just explaining the general programing logic, I don't code on NT, so maybe they have some way to lookahead this little technicality.
Thanks. I had read that but it when I used IsFirstTickOfBar it didn't work as expected, neither OnBarClose (entries one bar later) nor OnEachTick (entries during trigger bar)
It can be very tricky to wrap your brain around the different numbering schemes, and closed bars vs. open; and off-by-one bugs. I've spent many hours debugging those sorts of things in just one complicated strategy.
I deal more with strategies than indicators; but maybe try asking in the NT forum. You may even need to send them your logs and/or code.
Sounds like it can be done with the items already mentioned, but for some pesky bug in your code.