My strategy customizes the Chart Trader window behavior and is able to trade either the symbol on the chart to which it is applied (the default for Chart Trader), or trade a different symbol while continuing to take data from the chart symbol. For example, chart ES but trade MES "in the background" instead of ES.
Question please: When trading the alternate symbol (MES in the above example), the Chart Trader order lines do not appear on the chart -- obviously because the chart symbol is not actually being traded by the custom code.
Is there a way to make the Chart Trader order lines visible through code, then adjust their position on the chart based on what the strategy is actually doing? Just like Chart Trader would do if the symbol for orders matched the chart symbol? Again, in the example above the ES and MES prices track each other, so even if the customized Chart Trader strategy sent orders for MES, the order lines could still be drawn on the ES chart the strategy uses for its decision-making.
So to make visible and control the Chart Trader's order lines, what are the Entry, Stop, and Target order line object names / classes that would be referenced in code?
Any code snippets you can share would be appreciated. If anything here needs clarification, please contact me.
Thank you.
Comment