Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Alert Problem

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

    Alert Problem

    Hey all, i have a little problem with alert "issuance"

    Im trying to get an alert triggered on "Trend Change" using (Renko Hybrid Bar Type)

    So what i did is i got the indicator calculating on bar Close= false
    and
    ( Close[2] > Open[2] && Close[1] < Open[1] )
    {
    AlertXXXX
    }

    But the alert doesn't get triggered until after a 3rd bar has closed after the condition was met, which is unnecessary.

    if i do ( Close[1] > Open[1] && Close[0] < Open[0] ) it gets triggered despite the current bar hasn't closed yet, so it can reverse and that's not good :P

    How can i get the alert triggered immediately after the "change trend" bar close ??



    Click image for larger version

Name:	2014-12-16_135907.jpg
Views:	1
Size:	76.9 KB
ID:	902263
    Thank you guys.
    Last edited by kabott; 12-16-2014, 11:40 AM.

    #2
    Hello Kabott,

    Thank you for your post.

    I don't expect checking the came value for less than or greater than to work at all.
    Close[1] < Close[1]
    Close[0] < Close[1]

    Are you looking to check if the Close is greater than the Open in this case?

    If it is for Open then you want to check for FirstTickOfBar so that when the first down bar closes it will check this and allow you check the last two bars correctly.

    if(Close[2] >= Open[2] && Close[1] < Open[1] && FirstTickOfBar)
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Yes cal, i made a mistake writing the conditions here, but its alright on the ninjascript, i corrected that , anyways i think i was missing "FirstTickOfBar" thank you!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      666 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      377 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      110 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      575 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      580 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X