Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT8 "Draw.Line" problems

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

    NT8 "Draw.Line" problems

    Hi NT-Community,

    in NT7 I have these kinds of code snippets to make the automated strategy doings visible for me in the NT Strategy Analyzer:

    if ( ord_StopLoss != null )
    DrawLine(" StopLoss DashLine " + CurrentBar, false, 0 , dou_StopLossPrice, 1 , dou_StopLossPrice, Color.Red, DashStyle.Dash, 1);

    Explanation: ord_StopLoss is the StopLossOrder of the stratgsy. This DrawLine shows me where the StopLoss Order was. It makes a Dash on every OnBarUpdate as long as StopLossOrder is in the market.


    Unfortunately there have been some changes in NT8. I've done this adaptation with the help of the NT code breaking changes list:

    if ( ord_StopLoss != null )
    Draw.Line(this, " StopLoss DashLine " + CurrentBar, false, 0 , dou_StopLossPrice, 1 , dou_StopLossPrice, Brushes.Red, DashStyleHelper.Dash, 1);

    Result: Well the last code snippet in NT8 hasn't worked out in the way like it was in NT7. It seems that nothings happens..

    My Question: Which changes do I have to make in the last code snippet to produce a Dashline on every OnBarUpdate?


    Many thanks for help
    Last edited by Redmoon22; 10-08-2016, 04:53 AM.

    #2
    Hello,

    Thank you for the question.

    To better understand if the object is being drawn at all, could you access the Right click menu -> Drawing Tools -> Drawing objects... menu to see if the object is listed?

    This would be a good first step to see if it is being drawn, you could also see at what value in case it is plotting at 0 or a value out of the visible area. You are using AutoScale = false so this could be the case.

    I look forward to being of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    65 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    41 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    23 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    26 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    52 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X