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 Aviram Y, Today, 05:29 AM
        0 responses
        1 view
        0 likes
        Last Post Aviram Y  
        Started by quantismo, 04-17-2024, 05:13 PM
        3 responses
        25 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by ScottWalsh, 04-16-2024, 04:29 PM
        7 responses
        34 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by cls71, Today, 04:45 AM
        0 responses
        6 views
        0 likes
        Last Post cls71
        by cls71
         
        Started by mjairg, 07-20-2023, 11:57 PM
        3 responses
        216 views
        1 like
        Last Post PaulMohn  
        Working...
        X