Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Setting pixel space between bars

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Setting pixel space between bars

    Hi there,

    In my trading the slope of price action is really important. Obviously if you squashing the horizontal axis aribarlty changes the slope of price.

    As a guide line I have been advised for an OHLC chart, that the distance between each bar should equal the width of each bar (excluding the open/close little horizontal markers). So if the little OHLC verital line is 5 pixels then the space between each bar should be 5 pixels.

    Would it be possible to programmatically ensure this perhaps via means of an indicator?

    Thanks,
    Michelle

    #2
    Hello Michelle,

    When NinjaTrader calculates the slope with the Slope() method, this uses a number of bars and uses price.



    I would not be able to create a custom formula at your request to calculate using pixels, however, this thread will remain for any community members that may have formula like this for rendering or would willing to create this for you as a convenience to you.

    Once calculated, the bar width and scaling would need to be set by a ChartStyle script and would not be able to be set in an indicator or strategy.


    You can also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services. Please let me know if you would like our business development follow up with you with a list of affiliate consultants who would be happy to create this script or any others at your request.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Scaling of price chart for geometric shapes

      I agree with the request.

      A properly scaled chart with an Andrews pitchfork or a trendline or a circle looks completely different from an auto-scaled chart.

      Has anyone had success implementing the custom chart scaling feature found in other charting software? (I'm thinking of one in particular, but not sure if we can mention names.) If not, per support's reply, any ideas on which consultant to contact?

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by TraderBCL, Today, 04:38 AM
      1 response
      6 views
      0 likes
      Last Post bltdavid  
      Started by martin70, 03-24-2023, 04:58 AM
      14 responses
      105 views
      0 likes
      Last Post martin70  
      Started by Radano, 06-10-2021, 01:40 AM
      19 responses
      606 views
      0 likes
      Last Post Radano
      by Radano
       
      Started by KenneGaray, Today, 03:48 AM
      0 responses
      4 views
      0 likes
      Last Post KenneGaray  
      Started by thanajo, 05-04-2021, 02:11 AM
      4 responses
      471 views
      0 likes
      Last Post tradingnasdaqprueba  
      Working...
      X