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 not sure what you are seeing, but I only see this code executed on the first bar of the date in the debugger.
You can confirm this via the EasyLanguage Print Log by changing your code line with the Breakpoint to
something like: if debug = 1 then Print( BarDateTime.ToString(), "; I am here" ) ;
As the condition Date<>Date1[1] is true on the entire first bar, you will see multiple prints for each first bar of the day. This can be overcome by using an intrabarpersist variable that stores the current date, when Date <> this variable.
Something along the lines of:
Just a question, if you only want to take one trade per day, do you need the tradescounter variable?
Can you just not use MP by itself?, for example only take a trade when MP = 0
if your strategy exits (during the day) MarketPosition would return 0 again. Using MarketPosition alone might not effectively limit the strategy to one trade a day.
Regards,
ABCTG
JBroex
Just a question, if you only want to take one trade per day, do you need the tradescounter variable?
Can you just not use MP by itself?, for example only take a trade when MP = 0
It should depend on whether your trying to trade only during margin times ( 0700 to 1500 ) or if your holding from 0000 to 2459. If your trying to buy at session open the problem is the futures sessions begin at 1600 and carry over into the next day so using date RW alone wont work. if your trying to close out during normal hours try if time < 1459 then. nut im not sure exactly when you want to buy in and out