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)
Is there any way to get Multichart to recognize a manually drawn arrow on a chart? I'm trying to go back in charts and manually place trades by drawing and up or down arrow. Multicharts can then produce a performance report based on my arrows. Someone had the exact project in 2014 and he posted it in Downloads, however the code doesn't work. Thanks in advance.
Can you help answer these questions from other members on NexusFi?
take a look at Arw GetNext, as it will allow you to detect manually drawn arrows. I am not sure how MC would produce a performance report out of your arrows though (unless you track the performance yourself within the code of course or create a signal that takes entries and exits based on the arrows).
Thanks a lot @ABCTG.
I will take a look at that function. The plan is to build a strategy or "signal" that will generate buy or sell signals based on the direction of the arrow. It was attempted before in download called "Arrow Reader". However, the download was meant for a game of guessing market direction and statistics. I couldn't get it to do any more than that. Do you think that's possible in EL? Also is there alternatives that I can try, like capturing key strokes or mouse clicks? I've tried a mouseclick code but that didn't seem to work either lol
There are a couple of ways to approach this. You can have the strategy detect whether a new manual arrow is placed on the chart. Then it can fetch the direction of that arrow, followed by making a long/short decision and trade.
But in the first post you also mentioned you'd like to go back on the chart and place the arrows where you'd take trades. In that case, it might be easier to have a mouse click recalculate the strategy on all the historical bars (from the first to the last). It can then submit a trade when an arrow is placed on the bar.
Otherwise, without recalculating the strategy after the arrows are placed on the chart, I don't know how a strategy can submits orders for historical bars (it can't). I hope this makes sense.
You will have to recalculate the strategy one way or the other (either by switching the status off and on, by keystroke/mouse-click or by simply adding the strategy to the chart only when you are done drawing all the arrows) to make it aware of the information you placed on a chart (unless you forcefully update your strategy at set intervals using a time anyway).
If you just use mouse-clicks to specify the bars this would require storing the bar information (in a map for example), as otherwise the information would be lost of after a reload. On top of that you wouldn't know on which bar you clicked without adding some drawing, too and you would need a way to retrieve the direction of a trade from your click (for example if it was above the bar, go short and vice versa).
With using arrows you accomplish a lot of the above already: They stay on the chart, they show you were you placed them (you can even conveniently move them to other locations) and you can use the direction (or color) to "signal" a trade direction.
Now the only question would be how you want to reload your strategy code, so it can be react to the information (or updated information). If you don't feel comfortable coding that, you can accomplish it with switching the status off and back on of course. However a code induced reload as @Jura pointed out, using a mouseclick or mouse-click and key combination (to prevent unwanted reloads) would be more convenient.
Thanks guys
I managed to produce a code to have the ability to recognize the arrow direction and make trades based on that. I only had enough time to get it to that point, so I haven't don any troubleshooting or verification. I'm hoping to be able to handle multiple contracts too (as in scaling in and scaling out). I definitely need to get more intimate with "Arrow" commands.
as long as your strategy allows for multiple trades in the same direction, this shouldn't be a problem. You can probably get quite creative and use things like color or size of the arrow to determine the number of contracts to use for an order.
Oh and as far as the strategy performance, I just had to click status off and on every few arrows. I probably can just place my arrows all the way through then refresh the strategy once in the end. No reason to keep on refreshing the strategy every trade.