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 need to code my strategy so that it wil stop taking more than one trade per bar. I am using onbar update, because of the nature of the entry level (on a pull back of 10 ticks from the high of the bar that is painting). The strategy enters the trade and hits the target. Then it re-enters the trade, when the entry condition exhists again on the same bar. How can I stop this from happening, without using the calculate on bar close function?
Can you help answer these questions from other members on NexusFi?
I have found something that works somewhat, but I think there is a better solution. I have a variable that changes when ever I enter a trade. That variable will not be zero againg until the bar ends. This seems to work most of the time. Sometimes the market moves so fast that the variable is reset to zero and at the same time the trade re-triggers. I am getting close. Any thoughts on how to fix this. I am using range bars and the variable resets to zero if I hit the top or the bottom of the range bar. Is there a string that checks to see if this is a new bar? Then I can tell the strategy to reset the variable to zero if a New bar is painting. Once again Thank you for your input.