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

Arrow Line too long

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

    Arrow Line too long

    I have a indicator that plots arrow line works ok on nasdaq and es but in crude oil it plots a huge arrow code im using
    if (arrow.Count < 2 || arrow[1] != 1)
    {
    //lastArrow = DrawArrowUp("Up" + CurrentBar.ToString(), false, 0, Low[0] - offset * TickSize, upColor);
    lastArrow = DrawArrowLine("Up" + CurrentBar.ToString(), false, 0, Low[0] - offset * TickSize - len, 0, Low[0] - offset * TickSize, upColor, DashStyle.Solid, 3);
    //lastArrow = DrawText("Up" + CurrentBar.ToString(), false, "\x00e9", 0,
    // Low[0] - offset * TickSize, 0, upColor, arrowFont, StringAlignment.Center,
    // Color.Empty, Color.Empty, 0); //arrowFont
    lastBarWithArrow = CurrentBar;

    #2
    Hello misalto,

    Print the values being used.

    Print(string.Format("{0} | start y: {1}, end y: {2}", Time[0], 0, Low[0] - offset * TickSize - len, Low[0] - offset * TickSize ));

    DrawArrowLine("Up" + CurrentBar.ToString(), false, 0, Low[0] - offset * TickSize - len, 0, Low[0] - offset * TickSize, upColor, DashStyle.Solid, 3);

    What price is the end y being set to?

    Where is this on the CL chart?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      HI Chelsea
      i have what do i need to change ?
      Print(string.Format("SMA Up:{0} down:{1} {2}", current.UpValue, current.DownValue, Time[0]));
      var zero = true;
      if (current.UpValue + current.DownValue > sumBidAsk && current.UpValue - current.DownValue > 0 && (double)current.UpValue / (double)current.DownValue - 1 > (double)imbalance / 100 /*current.UpValue - current.DownValue > current.DownValue*/ && upSma)
      {
      Print(string.Format("Up:{0} SMA:{1} Time:{2}", (double)current.UpValue / (double)current.DownValue - 1, upSma, Time[0]));

      Comment


        #4
        Hello misalto,

        I'm not sure, what the price being printed for the start and end anchor? Where is this relative to the bottom of the CL chart?

        Likely one of the anchors is price you are not expecting.
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by ghoul, Today, 06:02 PM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by jeronymite, 04-12-2024, 04:26 PM
        3 responses
        44 views
        0 likes
        Last Post jeronymite  
        Started by Barry Milan, Yesterday, 10:35 PM
        7 responses
        20 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by AttiM, 02-14-2024, 05:20 PM
        10 responses
        179 views
        0 likes
        Last Post jeronymite  
        Started by DanielSanMartin, Yesterday, 02:37 PM
        2 responses
        13 views
        0 likes
        Last Post DanielSanMartin  
        Working...
        X