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 Rapine Heihei, 04-23-2024, 07:51 PM
        2 responses
        30 views
        0 likes
        Last Post Max238
        by Max238
         
        Started by Shansen, 08-30-2019, 10:18 PM
        24 responses
        943 views
        0 likes
        Last Post spwizard  
        Started by Max238, Today, 01:28 AM
        0 responses
        9 views
        0 likes
        Last Post Max238
        by Max238
         
        Started by rocketman7, Today, 01:00 AM
        0 responses
        7 views
        0 likes
        Last Post rocketman7  
        Started by wzgy0920, 04-20-2024, 06:09 PM
        2 responses
        28 views
        0 likes
        Last Post wzgy0920  
        Working...
        X