I'm making my first addon for Ninjatrader and I want to control the charttrader buymarket and sellmarket buttons so that before launching a trade it validates a list of things
I have managed to intercept the click event and if it doesn't meet my conditions I can cancel the execution of the trade
I need help to access from the button event to the active chart of the window to which the button that launched the event belongs, I need to read the asset that is on the chart and know if it has exceeded the maximum/minimum of the previous day. If the price has not reached the maximum/minimum of the previous day, I do not allow launching a market trade
I have managed to access the Chart object, parent of the button object that launches the event, but I don't know how to access the chart and read the last quote and the maximum and minimum values of the previous day
Can anyone help me?
Thanks

Comment