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 argusthome, Yesterday, 10:06 AM
      0 responses
      14 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      11 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      9 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      4 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      31 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X