I'm just learning how to code with Ninjascript and trying to implement a strategy where I can enter trades and manage positions while trading using ChartTrader at the same time. I started from the sample NT8 - LONG SHORT Toolbar Buttons provided in Strategies Download. Here are my questions:
(1) I have a Stop Loss order in my strategy that is submitted after the EnterLong() order get filled. When I enter using my custom strategy but then use ChartTrader to take partial position off, the shares size in the stop loss order doesn't change. How do I adjust that ?
(2) When I move my stop loss order by clicking on chart, the stop loss order is moved back to the original location set by my strategy. How do I prevent that to happen ?
(3) Is it possible for the custom strategy to use a pre-defined ATM strategies on ChartTrader. If yes, how to implement that ?
(4) In the current code, when I click on LONG button, I get in the trade. I want to be able to get more entries without having to exit the position, but those entries have to be initiated by me clicking the button again instead of automatically added. How do I modify the configuration or code to implement that ?
Thanks.
Comment