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 want to develop a strategy for testing purposes. However, I have never programmed a strategy for NinjaTrader, except for a couple of simple strategies using the strategy wizard. I have an idea that I am testing for an automated strategy, but I am doing it by hand. So far the results are very promising, but I want to know if it is possible to program it for NinjaTrader so that I can do the analysis on lots of data more easily.
Can an NT strategy do this?
- When the current price is below an indicator, enter multiple buy orders at so many ticks apart and varying contract amounts below the indicator starting so many ticks below the indicator being monitored?
- Then, as the orders get filled, track the average price for all contracts in the current position and automatically move the target order(s) to be so many ticks above the price average and automatically keep the stop order so many ticks below the price average of the contracts in the current position.
- Then, based on how many contracts are in the position, automatically adjust the target order(s) to a different price above the position price average.
- When the target order has been filled, close out any other unfilled orders.
Can you help answer these questions from other members on NexusFi?
Step 2: After the first order is filled, the target is set at a certain number of ticks away (in this case 10). A stop is also set (in this example 100 and off-screen). https://www.watersdomain.com/ninjatrader/step-2.jpg
Step 3: As the orders get filled, the target automatically adjusts to stay 10 ticks above the average price of the position. The stop is automatically adjusted to stay so many ticks away from the average (in this example 100). https://www.watersdomain.com/ninjatrader/step-3.jpg
Step 4: When a pre-defined threshold is exceeded, the target moves to a different number of ticks from the average position price (in this case 5 ticks). https://www.watersdomain.com/ninjatrader/step-4.jpg
So yes, it's possible to code something like that.
Is it also possible to blow very quickly an account with this strategy ?
Absolutely !!!
To blow it more quickly, the idea is not to add a cars after each step, but X2 after each time.
Thanks guys. I know this is not how you want to do it, but I also do not want to give away the "secret sauce" at present. I just want to know if the technical ideas to make it happen are even possible. Then, I have to learn what I need to know to program it.
Is there anything you can tell me to point me in the direction of what I need to know or are you aware of a sample code that I could see that would have most of the elements I would need?