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 Hwop38, 05-04-2026, 07:02 PM
      0 responses
      169 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Started by CaptainJack, 04-24-2026, 11:07 PM
      0 responses
      326 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      252 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      353 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      180 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Working...
      X