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 andrewtrades, Today, 04:57 PM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by chbruno, Today, 04:10 PM
        0 responses
        5 views
        0 likes
        Last Post chbruno
        by chbruno
         
        Started by josh18955, 03-25-2023, 11:16 AM
        6 responses
        436 views
        0 likes
        Last Post Delerium  
        Started by FAQtrader, Today, 03:35 PM
        0 responses
        7 views
        0 likes
        Last Post FAQtrader  
        Started by rocketman7, Today, 09:41 AM
        5 responses
        19 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Working...
        X