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)
Hi
I need some help with coding ask and bid functions. EUR_USD
In normal cases the computer runs the code in every new bar
but I want just the InsideBid and InsideAsk to update in real time to
prevent orders if the spread is too big but if the spread meet the
conditions I want to send the order without waiting for the next bar.
I also wander how I delete a profit take order if close doesn’t reach
the profit take aria in time limit ex. 10sek.
Best Regards
Ingemar
Can you help answer these questions from other members on NexusFi?
your strategy will have to use IntrabarOrderGeneration for that. Then you'll have to make sure that some parts are only updated on a new bar (in case you want to keep this behavior) and the code that collects the bid/ask data either with every tick or with a timer each X seconds. A timer might be required as the bid/ask data can update without a tick coming in and otherwise you'd might miss the information.
Multicharts keeps orders alive as long as the conditions that created the order are still present. You can use this to keep orders alive for a certain duration by storing the time when you send the order and comparing that to the current time - if the difference is larger than your X seconds, the conditional check would become false and Multicharts would cancel the order.
Thanks for your input, I understand the second part about cansel orders.
but the firs one I still need some more info, some cod example if someone have.
Best Regards Ingemar