Adding Buttons to a Chart: Manual Order Entry via a Strategy
Author: boreland
Creation Date: 2/7/2018 5:36 AM
profile picture

boreland

#1
I was wondering if anyone has written any code to add buttons to charts. For instant manual buy and sell buttons.

If orders were placed via a strategy, then the strategy would be aware that you entered a position. The strategy could then manage that trades' exit. Currently, one can right clip on a chart and place a live trade but the strategy remains blissfully unaware that you made such a trade. I do of course realize that an order placed via a chart button would only be placed on the next bar update, but one could still execute that order using the right chart click method, and block the manually entered chart trade from becoming a live order.

Also, I personally would like to be able to turn off a strategy during certain times via a button on the chart and not have to go through the process of clicking on the Alerts tab to switch off auto trading. There have been times when I've forgotten it was "on" and gotten a nasty surprise several hours later.

Perhaps I'm the only one who would like to add trade buttons? The great thing about this being a C# written trading platform is almost anything is possible.

I'd be very interested in peoples ideas on this, and if no one has already cracked this nut I might have ago.

profile picture

Eugene

#2
QUOTE:
For instant manual buy and sell buttons.

What about the Trade Ticket (Ctrl-T)?

QUOTE:
Also, I personally would like to be able to turn off a strategy during certain times via a button on the chart

Won't depressing the Stream button turn off a Strategy?
profile picture

boreland

#3
1. I've never really used the Trade Ticket. It's unlikely that a strategy would know that you have entered a trade simply because the entire chart gets redrawn every bar update, so it would have no memory that a trade was made at a given point in time. One could store the manual buttons trades in a List, and read it each bar update.

2. I was thinking that you would have to turn off "Auto-Place" on the Alerts Tab. It would be nice to do this programmatically. The Auto-Place button resides on tabPage 3, but the toolstrip control is not accessible, it resides in WealthLab.ChartTrader. Not sure how to get at it. Cone had away I think to get at it maybe?
profile picture

boreland

#4
Well, I see that there has been no interest shown in this type of functionality, so will not post the code, but I do want to report that it is possible to add buttons to real-time intraday strategies.
profile picture

girishbhatia

#5
Hi Boreland,
I'd be interested in learning how you added buttons. Can you please share the code.

Thx,
GB
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).