Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Horizontal Ray in Drawing Tools

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

  • aligator
    replied
    Originally posted by AmCTrading07 View Post

    Hello I am trying to use the Ellipse with the mahToolbar but it is not working. First of all, when I check the Ellipse box, the button is missing on the toolbar. I've tried to tweak the code but no luck at all (I saw the method DrawElipse and I thought it was missing a L (DrawEllipse)). Any idea about this? thanks
    I have no problem with the indicator either. Please note that the default NT icon for Ellipse is a circle (a perfect ellipse) not a classic elongated ellipse. Do you see a circle after you check the box for ellipse? Perhaps you have made unintended code changes (DrawEllipse instead of Draw.Ellipse) that cause this issue. I would recommend delete the indicator all together. Then, download and install the most recent "A mahToolBar6" here:



    Let me know if this resolved your problem.

    Cheers!

    Leave a comment:


  • NinjaTrader_Kate
    replied
    Hello AmCTrading007,

    Thank you for your reply.

    I'm unable to replicate this. It's possible it may not be visible on the toolbar if your chart is not expanded enough to fit it, but you'd want to touch base with aligator since they are the original developer.

    Please let us know if we may be of further assistance to you.

    Leave a comment:


  • AmCTrading07
    replied
    Originally posted by aligator View Post

    Welcome!

    Yes, it is possible to place the price in the right side scale. This is not an issue, it is a coding project and personally do not find it of any real value. However, If I recall correctly, NinjaTrader support has provided sample script in the past to include price labels in the right side scale.

    In my experience the right side scale in usually crowded with price labels from horizontal grid, indicators, price line, etc. and should not be cluttered more. .

    Cheers!
    Hello I am trying to use the Ellipse with the mahToolbar but it is not working. First of all, when I check the Ellipse box, the button is missing on the toolbar. I've tried to tweak the code but no luck at all (I saw the method DrawElipse and I thought it was missing a L (DrawEllipse)). Any idea about this? thanks

    Leave a comment:


  • aligator
    replied
    Originally posted by tradesmart27 View Post
    Hi aligator,

    thanks for all the input. Works fine here.

    I think, someone has asked earlier, which I am also interested in: would it be possible to place the price label to the price scale on the right
    or does anyone else have a solution for this issue?

    Thanks in advance!
    Welcome!

    Yes, it is possible to place the price in the right side scale. This is not an issue, it is a coding project and personally do not find it of any real value. However, If I recall correctly, NinjaTrader support has provided sample script in the past to include price labels in the right side scale.

    In my experience the right side scale in usually crowded with price labels from horizontal grid, indicators, price line, etc. and should not be cluttered more. .

    Cheers!
    Last edited by aligator; 02-06-2022, 10:53 AM.

    Leave a comment:


  • tradesmart27
    replied
    Hi aligator,

    thanks for all the input. Works fine here.

    I think, someone has asked earlier, which I am also interested in: would it be possible to place the price label to the price scale on the right
    or does anyone else have a solution for this issue?

    Thanks in advance!

    Leave a comment:


  • NinjaTrader_Kate
    replied
    Hello joselube001,

    Thank you for your reply.

    I have added a vote for you to SFT-2149 as well.

    Please let us know if we may be of further assistance to you.

    Leave a comment:


  • joselube001
    replied
    Add my vote, please.
    Thank you.

    Leave a comment:


  • aligator
    replied
    Originally posted by AtlasTrader View Post
    Thank you for sharing that indicator, it made my workflow so much easier. Is there a way to move the price label to the left (start of the ray)? Having it to the right obscures the current price action. I'm hopeless with code so I'm hoping someone might know how to do this. Thanks a lot!
    It is not difficult to place the price label to the left side but it will cause cluttering of the chart, especially if there are a few indicators on the chart.

    However, you can simply add a right side margin to your chart to allow for clean price action and other UI drawings. Simply, right click on the chart then go to chart "properties" and increase the value for "Right Side Margin" to any width you like. I personally use a value of 300 to give me plenty of room for price action, text comments, future calendar events, etc.

    Cheers!

    Leave a comment:


  • AtlasTrader
    replied
    Thank you for sharing that indicator, it made my workflow so much easier. Is there a way to move the price label to the left (start of the ray)? Having it to the right obscures the current price action. I'm hopeless with code so I'm hoping someone might know how to do this. Thanks a lot!

    Leave a comment:


  • aligator
    replied
    Originally posted by ATooZ View Post
    This is really great !! Thank you so much. I just wanted to ask one more thing as I don't know much of programming - will it be possible to only draw this for certain timeframes? What I mean by this is suppose I have a 5 min, 15 min and 4 hour chart opened side by side for ES and I draw the horizontal ray on 15 min and make it global then it will show up on both 5 min as well as 4 hour chart. So is there a way to draw this only on timeframes <=15 min but not on timeframes >15 min.
    I assume anything can be programmed, but I do not think the use of "Global" in Draw.Text will differentiate between time frames.

    However, a couple of possible alternatives are to either attach the indicator to those charts with time frames of interest or if all your charts are the same but with different time frames you can make a chart template with the indicator attached then simply apply the template to your time frames of interest.

    Cheers!

    Leave a comment:


  • ATooZ
    replied
    This is really great !! Thank you so much. I just wanted to ask one more thing as I don't know much of programming - will it be possible to only draw this for certain timeframes? What I mean by this is suppose I have a 5 min, 15 min and 4 hour chart opened side by side for ES and I draw the horizontal ray on 15 min and make it global then it will show up on both 5 min as well as 4 hour chart. So is there a way to draw this only on timeframes <=15 min but not on timeframes >15 min.
    Last edited by ATooZ; 10-31-2021, 07:55 AM.

    Leave a comment:


  • topa11
    replied
    Originally posted by aligator View Post

    You are almost there, missed commenting out the last " } ."

    I suggest make a copy of the Add-On HorizontalRay Drawing Tool and rename it as your revised version so that it is not mixed with the original. Just comment out lines 313 thru 321 of and compile, it should work. Do not delete, just comment out in case you need to go back to original.

    Let me know if it worked for you. It is a great 1-click icon on mahToolBar6. I can draw many rays and also delete them all with one click of the remove icon.
    Aligator, thanks for the advise, its looking and working great. but i took a short cut:
    //draw price label
    if(startPoint.X < panel.W){
    }
    thanks again

    Leave a comment:


  • aligator
    replied
    Originally posted by topa11 View Post

    I tired to delete this section, but there are errors when compiling. i can probably do it if i knew what i was doing. how much would this cost to change it? thanks
    //draw price label
    if(startPoint.X < panel.W){
    TextFormat textFormat = chartControl.Properties.LabelFont.ToDirectWriteTex tFormat();
    string label = chartControl.Instrument.MasterInstrument.FormatPri ce(StartAnchor.Price, false);
    TextLayout textLayout = new TextLayout(Globals.DirectWriteFactory, label, textFormat, 999, textFormat.FontSize);
    Point labelAnchor = new Point(panel.W - textLayout.DetermineMinWidth(), startPoint.Y);
    RenderTarget.DrawTextLayout(labelAnchor.ToVector2( ), textLayout, Stroke.BrushDX);
    textLayout.Dispose();
    }
    You are almost there, missed commenting out the last " } ."

    I suggest make a copy of the Add-On HorizontalRay Drawing Tool and rename it as your revised version so that it is not mixed with the original. Just comment out lines 313 thru 321 of and compile, it should work. Do not delete, just comment out in case you need to go back to original.

    Let me know if it worked for you. It is a great 1-click icon on mahToolBar6. I can draw many rays and also delete them all with one click of the remove icon.
    Last edited by aligator; 08-23-2021, 04:39 PM.

    Leave a comment:


  • topa11
    replied
    Originally posted by aligator View Post

    Thanks. Yes, however, it will require some code changes.
    I tired to delete this section, but there are errors when compiling. i can probably do it if i knew what i was doing. how much would this cost to change it? thanks
    //draw price label
    if(startPoint.X < panel.W){
    TextFormat textFormat = chartControl.Properties.LabelFont.ToDirectWriteTex tFormat();
    string label = chartControl.Instrument.MasterInstrument.FormatPri ce(StartAnchor.Price, false);
    TextLayout textLayout = new TextLayout(Globals.DirectWriteFactory, label, textFormat, 999, textFormat.FontSize);
    Point labelAnchor = new Point(panel.W - textLayout.DetermineMinWidth(), startPoint.Y);
    RenderTarget.DrawTextLayout(labelAnchor.ToVector2( ), textLayout, Stroke.BrushDX);
    textLayout.Dispose();

    Leave a comment:


  • aligator
    replied
    Originally posted by topa11 View Post

    aligator this is a great tool. quick question is there a way to disable the price label? thanks
    Thanks. Yes, however, it will require some code changes.

    Leave a comment:

Latest Posts

Collapse

Topics Statistics Last Post
Started by CaptainJack, 05-29-2026, 05:09 AM
0 responses
45 views
0 likes
Last Post CaptainJack  
Started by CaptainJack, 05-29-2026, 12:02 AM
0 responses
30 views
0 likes
Last Post CaptainJack  
Started by charlesugo_1, 05-26-2026, 05:03 PM
0 responses
99 views
0 likes
Last Post charlesugo_1  
Started by DannyP96, 05-18-2026, 02:38 PM
1 response
177 views
0 likes
Last Post NinjaTrader_ChelseaB  
Started by CarlTrading, 05-11-2026, 05:56 AM
0 responses
170 views
0 likes
Last Post CarlTrading  
Working...
X