Coloring an IndicatorLine by Slope: Questions for Optimal Coding - NinjaTrader Programming | futures io social day trading
futures io futures trading


Coloring an IndicatorLine by Slope: Questions for Optimal Coding
Updated: Views / Replies:14,448 / 59
Created: by Trendseek Attachments:19

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
 19  
 
Thread Tools Search this Thread
 

Coloring an IndicatorLine by Slope: Questions for Optimal Coding

  #21 (permalink)
Elite Member
Massachusetts (USA)
 
Futures Experience: None
Platform: NinjaTrader
Favorite Futures: YM
 
stephenszpak's Avatar
 
Posts: 778 since Jun 2009
Thanks: 144 given, 358 received


Fat Tails View Post
Then you need to define what is "slightly". I would use a multiple of the range or average range.

Don't understand. I was thinking about RangeNoGap candles, which have the same range.

Attachment shows much the same thing again.

The steepness of the moving average is
significant at the left for a bullish candle but at the right it is almost horizontal. That area at the right
might be a good cutoff point. The SMA of 2 should have that slope or less to be a neutral
candle. I opened the databox window but it only gives the value of the SMA of 2, which doesn't
help.

I am checking out the futures.io (formerly BMT) indicators now for one that might be helpful in this.

- Stephen

Attached Thumbnails
Coloring an IndicatorLine by Slope: Questions for Optimal Coding-new-image.png  
Reply With Quote
 
  #22 (permalink)
Elite Member
Massachusetts (USA)
 
Futures Experience: None
Platform: NinjaTrader
Favorite Futures: YM
 
stephenszpak's Avatar
 
Posts: 778 since Jun 2009
Thanks: 144 given, 358 received

Trying this indicator out now to make some sort of progress hopefully. Didn't see any
indicator that is close to providing exactly what we've talked about.



MASlopeMTF

First version of MASlopeMTF, it display MA slope (only) of different time frames, it doesn't display the MA line itself.
Colored background colored by slope.
User defined text for slope box.
Currently it displays only real-time slope, no history at this version.
Exported using NT Version 7.0.1000.7


The indicator says 63 degrees, at lower right corner. Does this seem in the ballpark FalTails?
See next post for attachment.


Last edited by stephenszpak; April 16th, 2012 at 02:58 AM.
Reply With Quote
 
  #23 (permalink)
Elite Member
Massachusetts (USA)
 
Futures Experience: None
Platform: NinjaTrader
Favorite Futures: YM
 
stephenszpak's Avatar
 
Posts: 778 since Jun 2009
Thanks: 144 given, 358 received


Image in attachment.

Sorry to keep posting to myself. I checked out an area that
had the moving average going flat. The angle was 61 degrees. I assumed
the indicator would look at and use the moving average I had chosen, ( SMA2 ), however
the MASlopeMTF indicator used its own parameters here. Have to check this out to see
if MASlopeMTF can be helpful or not.

Attached Thumbnails
Coloring an IndicatorLine by Slope: Questions for Optimal Coding-save-newest-image.png  

Last edited by stephenszpak; April 16th, 2012 at 03:31 AM.
Reply With Quote
 
  #24 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,651 since Mar 2010
Thanks: 4,226 given, 25,597 received
Forum Reputation: Legendary

I have tried to explain about a hundred times that it is impossible to use angles on scalable charts. If this is too difficult to understand I cannot help. Angles were a concept used a long time ago as a proxy for momentum. That was when charts were printed on paper and neither time scale nor price scale were ever changed.

Using angles on a software like NinjaTrader is simply nonsense.

To decide whether a moving average has made a significant change you would need to compare it to the average bar size (average range) or the average bar size + gaps if applicable (average true range). If the change in the moving average exceeds a specific multiple of the average range or average true range, the momentum represented by that moving average can be deemed as significant.

You just need to define the threshold.

Reply With Quote
The following user says Thank You to Fat Tails for this post:
 
  #25 (permalink)
Elite Member
Massachusetts (USA)
 
Futures Experience: None
Platform: NinjaTrader
Favorite Futures: YM
 
stephenszpak's Avatar
 
Posts: 778 since Jun 2009
Thanks: 144 given, 358 received


Fat Tails View Post
I have tried to explain about a hundred times that it is impossible to use angles on scalable charts. If this is too difficult to understand I cannot help. Angles were a concept used a long time ago as a proxy for momentum. That was when charts were printed on paper and neither time scale nor price scale were ever changed.

Using angles on a software like NinjaTrader is simply nonsense.

To decide whether a moving average has made a significant change you would need to compare it to the average bar size (average range) or the average bar size + gaps if applicable (average true range). If the change in the moving average exceeds a specific multiple of the average range or average true range, the momentum represented by that moving average can be deemed as significant.

You just need to define the threshold.

Sorry about that.

Reply With Quote
 
  #26 (permalink)
Elite Member
Atkinson, NH USA
 
Futures Experience: Intermediate
Platform: NinjaTrader 8/TensorFlow
Broker/Data: NinjaTrader Brokerage
Favorite Futures: Futures, CL, ES, ZB
 
NJAMC's Avatar
 
Posts: 1,925 since Dec 2010
Thanks: 2,962 given, 2,294 received


stephenszpak View Post
Sorry about that.

I have collected some of @Fat Tails statements about Angles in a Wiki:
Concept of Slope/Angle in indicators - Big Mike's Trading Forum

Nil per os
-NJAMC [Generic Programmer]

LOM WIKI: NT-Local-Order-Manager-LOM-Guide
Artificial Bee Colony Optimization
Reply With Quote
The following 3 users say Thank You to NJAMC for this post:
 
  #27 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,651 since Mar 2010
Thanks: 4,226 given, 25,597 received
Forum Reputation: Legendary


stephenszpak View Post
Sorry about that.

@stephenszpak: Sorry myself, did not want to attack you.

I would measure the difference between the SMA of the current bar and the SMA of the prior bar and compare that to the average true range. That ratio would tell me, whether the momentum indicated by the SMA is significant or not.

Reply With Quote
The following 2 users say Thank You to Fat Tails for this post:
 
  #28 (permalink)
Elite Member
Massachusetts (USA)
 
Futures Experience: None
Platform: NinjaTrader
Favorite Futures: YM
 
stephenszpak's Avatar
 
Posts: 778 since Jun 2009
Thanks: 144 given, 358 received


Fat Tails View Post
@stephenszpak: Sorry myself, did not want to attack you.

I would measure the difference between the SMA of the current bar and the SMA of the prior bar and compare that to the average true range. That ratio would tell me, whether the momentum indicated by the SMA is significant or not.

I understand what you're saying now about the slope I believe. Should have picked up on that sooner.

I can eye ball that measurement or do it with a cross hair. I guess no indicator does it as yet automatically.

Thanks

Reply With Quote
 
  #29 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,651 since Mar 2010
Thanks: 4,226 given, 25,597 received
Forum Reputation: Legendary


stephenszpak View Post
I understand what you're saying now about the slope I believe. Should have picked up on that sooner.

I can eye ball that measurement or do it with a cross hair. I guess no indicator does it as yet automatically.

Thanks

The BollingerUniversalX indicator as per post #6 of this thread has a neutral area for the slope based on the average true range, you just would need to adapt the code to your indicator.

Reply With Quote
 
  #30 (permalink)
Elite Member
Massachusetts (USA)
 
Futures Experience: None
Platform: NinjaTrader
Favorite Futures: YM
 
stephenszpak's Avatar
 
Posts: 778 since Jun 2009
Thanks: 144 given, 358 received



Fat Tails View Post
The BollingerUniversalX indicator as per post #6 of this thread has a neutral area for the slope based on the average true range, you just would need to adapt the code to your indicator.

Just got some time so I played around with it.

First off, it does work pretty well. The idea at the moment would be to color code the
candles or HiLo bars or whatever by where the closing price is.

If within the bands then, neutral.
If above upper band then, bullish.
If below the lower band then, bearish.

The problem that keeps coming up is with the dojis. Sometimes the indicator
will place the doji, that has the same close, within the bands. Then the coloring would be neutral, which it
should be. Other times the doji, that has the same close, is outside of the bands. The coloring would then
go bullish or bearish which it should not.

In the 6E using 3 RangeNoGap charts these dojis are always coming up.
If the bands are widened to include all the dojis, then candles that should go bullish or bearish
have closes within the bands and would be colored neutral.

Is there a way to make all dojis with the same close neutral, regardless of what
the computations of BollingerUniversalX come up with, within some code? I believe you
said once that NT can't do stuff like that.


The anaThrustBars are fine for now if not.

- Stephen

Attached Thumbnails
Coloring an IndicatorLine by Slope: Questions for Optimal Coding-graph-1.png  
Reply With Quote

Reply



futures io > > > > > Coloring an IndicatorLine by Slope: Questions for Optimal Coding

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Some Basic NinjaTrader Coding Questions -- IDataSeries Crow NinjaTrader Programming 7 October 15th, 2017 04:49 AM
Tricky NinjaScript coding {questions} . . . jmejedi NinjaTrader Programming 10 August 2nd, 2014 10:09 PM
InvestorRT axis label coloring Big Mike Investor/RT 3 August 18th, 2011 07:53 AM
NT MA with BG coloring emini_Holy_Grail NinjaTrader 10 January 11th, 2011 07:29 AM
On finding the optimal settings for a range interval trendisyourfriend The Elite Circle 5 December 7th, 2010 02:53 PM


All times are GMT -4. The time now is 07:39 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-11 in 0.16 seconds with 20 queries on phoenix via your IP 54.226.132.197