Need help to make a strategy to create fibs, and place order if fib are hit NT8 (New) - NinjaTrader Programming | futures io social day trading
futures io futures trading


Need help to make a strategy to create fibs, and place order if fib are hit NT8 (New)
Updated: Views / Replies:295 / 4
Created: by Robinson94 Attachments:2

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors – all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you don’t need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

Need help to make a strategy to create fibs, and place order if fib are hit NT8 (New)

  #1 (permalink)
Trading Apprentice
Paris / Île de France / France
 
Futures Experience: Advanced
Platform: NinjaTrader 8
Favorite Futures: CL
 
Posts: 20 since Aug 2016
Thanks: 2 given, 38 received

Need help to make a strategy to create fibs, and place order if fib are hit NT8 (New)

Hello !
I'm trying to create a semi-automated strategy (not an atm strategy), but a strategy that will not make any decisions, but that can draw a fib extension, adjust the fib if the point where the fib has been drawn is broken, and, if a certain fib level is hit, start to create an atm order, to start to trail a trade opened with an atm strategy, and then adjust on the value of an simple indicator that i made, that has only one value, to trail a trade.
(by the way, i made this thread 3 days ago, but i just saw that there was a subdivision for ninjascript programming, so i'm re-making the thread )

This is the basic explanations of what i would like, so let me explain why :
I'm a long-term day-trader, and there is a lot of peoples that do the same thing as me, but long term, this mean that i can be in a trade for 6-8 hours. But after the entry is made, i actually don't take any decisions, and i'm only waiting for a fib level to get hit, and to create a stop market order, to trail a trade, then i attach this order to the value of an indicator.
But, i think we can all agree, having to spend 6-8 hours in front of a screen, to press 2 buttons, is really annoying, and also, you can't have your mind clear, if for example you walk away from the screen.
A strategy like the idea i have in mind, could help a lot of traders to make their life easier, and to reduce time lost in front of a screen to press a button, and reduce stress.

I have tried to build this, and i have been helped with the ninjatrader support team (i'm trying to build this on NT8), they are doing a great job, but really quickly, in more complex questions they only point me to documentation, that is not documented enough to do the job ! And i don't think third part developer is the way to go, because of the way of doing of many, to do the job quickly, to do a lot of it, but facturing a lot time, and we can also ended up with a code that we don't understand, and can't modify. So that's why i'm here !
Whit the ninjatrader support team, i didn't succeed building what i wanted, but i learn what is possible to do with NT8, and so i have created a detailled plan on how we could create this. So, if you want to help or contribute to create this strategy, to make gain a lot of time to a lot of peoples, it would really be appreciated !


So : the idea of the strategy, or script, is to keep the freedom of opening a trade with the dom, and a atm strategy, and having a atm strategy stop loss that don't move (created by the atm strategy, not by the automated strategy). And i have a target, based on one particular fib extension level, but this level is dynamic, and can change if the point where i placed it is broken, and my stop not hit, to avoid to have, for exemple an input with the target price in the strategy, but then, we have to stay in front of the charts to adjust the extension if needed, and so we are back to square one.

- With this in mind, the first thing that the strategy need to do, is to be enable to draw, or adjust a fib extension. But before this, here's the basics stuff that could be great for the strategy to have :
- the strategy can start working, only if we are short or long, in the instrument where she is applied, and on the account that we set before. To avoid, like to forgot to disable the strategy, and then she's going to take order to open a position, instead of taking order to leave a position.
- The strategy will detect if we are long or short, and then start to use the short, or long version of the strategy.
- if the strategy has an error, she will cancel all positions on the instruments, and delete all orders.
- the strategy will use the amounts of contracts that are in the actual trade, to set the amount of contracts she need to put in her order.
- the strategy cancel everything and every order 3060 seconds before the close of the instrument


- About the extension, the strategy should be enabled to draw or adjust a fib extension (we can either, choose the 3 points on the chart where she should draw the extension, or we can put the value of the 3 points in a input before we launch the strategy). Then, when the strategy has the 3 points, and has drawn the extension, she's going to take the value of the 85,4% fib level (with an offset of -5ticks if the account is long, and +5ticks if the account is short), so if the strategy see that the price has reach at any time (not close above the target price), the target price (and she take the offset, so 5 ticks below or above), she's going to start the trail stop that i'm going to explain after. But so, she use the 85,4% fib level with an offset (if the offset could be modified it would be great !) to set the target.
The first 2 point of the fib extension (in case of a long trade, the first low and high), will never move, so we don't worry about them (ps : the atm stop loss is placed manually by the atm strategy below the first point, but the strategy don't care about the stop loss created by the atm strategy. But so, if the first point where the extension is drawn is broken, we are going to get stop out anyway, and if the strategy see that the account became flat on the instrument, she will stop).
But the tricky thing, is that the third point can change. Let's say we have taken the input to had manually to set the points of the extension, and that i have taken the trade a long trade a little after the third point (the low), this low can be broken, without triggering the stop loss, but in this case, the fib extension, is not placed at the good low.
So my idea, is that the strategy take the third point value put by the user, and considerate this point as a low (or a high if the strategy see that the account is short), and if the strategy see that at any time this low is broken, she will considerate, that the new low since the low put by the user, is here new low. And she will delete and draw a new extension (or adjust), based on still the 2 first points, but she will by itself, take the new low has a third point to create the extension.
If this new low is broken again, she will do the same operation, and if we keep breaking low, until my stop loss is hit, the strategy will see that the account is flat, and will shutdown.
And, she will always take the new 85,4% fib level with the offset, as her target level. (i'm going to explain what is the target level)


- Now that we have our dynamic fib extension, we have one more thing to do, is that the strategy use the target level as a point to start to trail the trade. Since the strategy, just need to know, what is the side of the trade (long or short), to work, she don't care about the stop loss made by the atm strategy, or the entry price. All that the strategy will do, is constantly check, and wait, if the price has reach the price of the target with the offset. Then if the price do hit the target price, the strategy will create an atm order (so the user can see the order and adjust it if needed, but its managed by the strategy), an sell stop market order (or a buy if i'm short), then she will attach it to the value of an indicator that will just create a plot if the candle is green (close above open), (there is 2 versions that i build, the long version, that will be used if i'm a in a long trade, and the short version, used if i'm short, the long create dot on up candle, and short on down candle), (i posted the indicators in this post), (by the way, if the strategy need to create the order before it can be ajustes, it could be a idea to put a sell market stop on a -1 value, and a buy on a 9999999999 value, to be sure its not hit. Then, when the order is created, she adjust the order on the value of the good indicator depending on the direction of the open trade, she adjust with an offset of -1 if i'm long, and +1 if i'm short (so the order is one tick below the candle if long, and one above if short). And then, on a bar close base, she will see if the value of the indicator is different, and she will try to move the order to the new value of the indicator if its different.

Then, when the order is triggered and filled, obviously, the account become flat, and since the atm strategy is canceled when the account become flat, the stop loss will be deleted. Then the last goal of the strategy, is to check if there is any order, or position left on the instrument, if there is, she will canceled or close all this, then she will shutdown, and send a message to NT8 like : TrailStop finished, and all positions closed.


That's the plan, i try to make it as detailed as possible, so it would be easier for somebody who want to try to programme, or help programming this thing to understand the plan.

It would really help a lot of people if we can succeed on building this, you can totally contact me on pm about this, or the best, is to speak trough this tread, so a maximum of peoples can get value out of this.

Have a great day !

PS : the two indicators that i posted, are for nt8

Attached Files
Register to download File Type: zip LONGAutotrailstop.zip (1.6 KB, 14 views)
Register to download File Type: zip SHORTAutotrailstop.zip (1.5 KB, 12 views)
Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Market Wizard
London UK
 
Futures Experience: Beginner
Platform: CQG
Favorite Futures: Futures
 
xplorer's Avatar
 
Posts: 3,053 since Sep 2015
Thanks: 6,571 given, 4,824 received
Forum Reputation: Legendary


Hi there

Not sure if you realized but you created the same post in two different threads.


@Big Mike or @sam028 FYI as duplicate.

Reply With Quote
 
  #4 (permalink)
Trading Apprentice
Paris / Île de France / France
 
Futures Experience: Advanced
Platform: NinjaTrader 8
Favorite Futures: CL
 
Posts: 20 since Aug 2016
Thanks: 2 given, 38 received

Yes !
Thanks for pointing it, i fully know that i have made two time the same thread, but i think the ninjatrader programming section it better for this thread.
I have posted has soon has i upload this thread, in a old thread a link to this one, and if a moderator was passing by that the old thread could be removed.
And, to have no confusion, on the start of this thread, i said that i posted it 2 time, and the name of this thread is New !

Anyway, i cannot delete the old thread myself ?

Thanks for pointing it and quoting big mike. (by the way, i don't know what FYI as duplicate mean, but the thread that i would like to keep is this one, and the one that could be good to remove is this one : https://futures.io/ninjatrader/42569-need-help-make-strategy-create-fibs-place-order-if-fibonacci-hit-ninjatrader-8-a.html

Reply With Quote
The following user says Thank You to Robinson94 for this post:
 
  #5 (permalink)
Market Wizard
London UK
 
Futures Experience: Beginner
Platform: CQG
Favorite Futures: Futures
 
xplorer's Avatar
 
Posts: 3,053 since Sep 2015
Thanks: 6,571 given, 4,824 received
Forum Reputation: Legendary


Robinson94 View Post
Yes !
Thanks for pointing it, i fully know that i have made two time the same thread, but i think the ninjatrader programming section it better for this thread.
I have posted has soon has i upload this thread, in a old thread a link to this one, and if a moderator was passing by that the old thread could be removed.
And, to have no confusion, on the start of this thread, i said that i posted it 2 time, and the name of this thread is New !

Anyway, i cannot delete the old thread myself ?

Thanks for pointing it and quoting big mike. (by the way, i don't know what FYI as duplicate mean, but the thread that i would like to keep is this one, and the one that could be good to remove is this one : https://futures.io/ninjatrader/42569-need-help-make-strategy-create-fibs-place-order-if-fibonacci-hit-ninjatrader-8-a.html

Yep, perhaps it's best that you send the request directly to @Big Mike yourself and he should be able to help.

Reply With Quote

Reply



futures io > > > > > Need help to make a strategy to create fibs, and place order if fib are hit NT8 (New)

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
[NinjaTrader]    Fib Fan NT8 sparks01 Platforms and Indicators 1 November 8th, 2016 07:06 AM
Indicator with buttons to create pending order with strategy at swing high/low matevisky NinjaTrader 1 November 22nd, 2014 04:41 AM
how to make program store price value after crossover and then use to place a limit honoluluhustler MultiCharts 3 August 3rd, 2014 07:00 AM
Markets Hit by High Volume: 'Stocks All Over the Place' ab456 News and Current Events 1 August 1st, 2012 03:31 PM


All times are GMT -4. The time now is 02:46 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts
Page generated 2017-12-15 in 0.13 seconds with 20 queries on phoenix via your IP 54.226.132.197