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)
I have a 3rd party indicator that auto-trades. I didn't realize you could do that with an indicator instead of a strategy. I'm a hack, but have written both. How would I write an indicator that trades? Is it as simple as putting the commands in an indicator instead of a strategy?
And then how would I put some of the parameters on the screen as buttons, e.g., On/Off, Long, Short, ATM to use, etc, so I can change them on the fly?
If anyone has one I could use as a model, I would appreciate getting my hands on it!
Vicki
Can you help answer these questions from other members on NexusFi?
I've never tried sticking any of the ATM methods into an indicator? I JUST started playing with the NT provided ATM framework myself a few days ago, so my knowledge is limited.
But, if you want to be able to manipulate orders on the fly, you will want to create orders with the ATM methods as suggested by trendisyourfriend.
I have a similar thing working right now, but I'm still working on it. It simply places and replaces orders in a range. But I have it in a strategy, not an indicator.
Typicaly strategies, do not allow you to manipulate orders after they are placed, its all run internally by the strategy. But orders created via ATM methods allow you to manipulate the orders.
I'm 99% sure you cannot do ATM trades from within a script. You can do what they call "managed" or "unmanaged" trades in a script. You can do a bracket pretty easily with managed trail stops (using the NT method) or stop limits and targets. If you want to change an order, for example, that will be an unmanaged trade and they warn only experienced coders should do these. There's actually a lot to it if you think about it... every order needs to wait for the confirm and then consider that before "closing" a position lest you actually be opening one instead. That sort of thing.
Also, it depends on if you are talking about the trades being placed by strategy-logic, or ATM-logic?
The two are different... E.g., the strategy-logic trades, will run trades from bar zero, to the current bar, and places those trades, and create a strategy-position.
ATM-logic trades, do not run on prior bars, and start in real-time... so when using this logic, both the unmanaged and managed methods you typically use, do not apply here. See THIS link and they kind of talk about it here.
I've got one working right now. I'm gonna post a video of it, running on replay data, and show you what I mean.
I just got into this ATM stuff a few days ago. I knew what I wanted TO DO, but I didn't know what it was. I wished someone could have told me to look into the ATM section, would have saved me the several hours spent reading the docs trying to figure it out
There are multiple reasons, like having a sexier ChartTrader with a more advanced logic, or having a manual entry which is then managed by a strategy more complex than what an ATM can do.
You can do whatever you want from an indicator, but all is not necessarily supported and documented (but it works).
Did you explore the ATM Strategy Methods ? Everything you have mentionned in your last post can be done within a Ninjascript strategy outside of the indicator environment. The strategy and Add-on environments are the suggested way by Ninjatrader for this type of work.