Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SharpDX Turn Text 45 Degrees, and Graphics Resource Question

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

    SharpDX Turn Text 45 Degrees, and Graphics Resource Question

    Hello,
    I know SharpDX is not officially supported, but i can't find out this one little thing and maybe you guys can help explain it to me but i know this would help a lot of others out there because ive scoured the forums for an answer to this question.

    Right now im trying to paint text rotated 45 degrees 25 bars back, thats it, I saw a forum post about this called TextRotationDX.zip Example, but i cant find it when attempting to add to chart.
    I understand the concept of SharpDX, but not how to actually implement a basic line or text into an indicator that we can add to chart im confused about where the logic goes if we have the onbarupdate and onrender method

    Premise: To paint a 45-degree SharpDX Draw Text 25 bars ago at the most recent high
    1.)
    Are we required to handle all mouse movements so that when we drag the chart and resize the sharp DX object gets resized and repositioned actively?
    2.) If we're using the onRender method where does the logic go? For example, if we draw a sharp DX line every time RSI is oversold at bottom of the bar to see if it breaks.
    Where Im At?
    Right now i have the TextRotationDXExamples and i imported them, but they don't seem to show up in indicators, so i can't actively test and tweak

    I guess what im really asking for is one little example of a SharpDX object being drawn relative to the chart and not static to the window, just like if we drew a trendline or zig-zag on the chart, when we move and resize the chart, the object goes with it.
    I know this is a lot to ask, but i see that the Graphical resources are used with SharpDX, and its BUTTERY SMOOTH even with hundreds of lines.

    Lastly, Is SharpDX the only way to specify objects drawn like lines and Fibonacci ratios on the GPU
    Im sorry, Im terrible
    Sincerely,
    Michael

    Script I was talking about that wont show up in indicators:
    Attached Files
    Last edited by Entwaze; 02-16-2023, 07:58 AM.

    #2
    Hello, thanks for writing in. The example is in its own folder at the top of the Indicators list, the folder is called CustomRenderingExamples. The first place to start would be to study this example to see how to render and rotate text. To draw something at a specific point in the chart you will need to iterate through the visible bars on the chart and check the price or indicator data that is required for the text to be drawn, then draw the text at that bar time and price. You can do this by iterating between the FromIndex and ToIndex of the ChartBars. See the example here:

    Comment


      #3
      OMG punch me sheesh
      Thank you a Ton!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      630 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      364 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      105 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      566 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      568 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X