• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Alerts question

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

    Alerts question

    Hello,
    My scenario is slightly different but thought relevant to post here because a) I have screenshots and b) it appears pretty clearly to be wrong i.e. a concrete example.
    however, it may well be operator error/incorrect understanding, in which be glad for explanation as I can't see how. I can say I am not by any means clear.

    Re: images:

    YM Alert Log 123601 - shows an alert on 2min chart triggered at 12:36:01

    YMOHL Day Alert Condition Cross Above - shows that Alert's Conditions.
    Data Series YM 09-18 (2 min) (Upper of 3 Data Series is the Full Session series) High of the Current Bar minus 5 ticks Crosses Above (Look back period 1) OHL Day indicator Current High

    I confess I do not believe I completely 'get' Look back period in this context at least, however I believe it does not matter/affect that that the indicator is triggered does not appear to be correct, or at least I cannot see how.

    YM 2 min 123601 - shows the chart to which the Alert/Data Series/Indicator are attached.
    It can be seen that at 12:36 the high of the (small green) bar (first condition) is at 25810.
    The OHL Day indicator (second condition) Current high (Green Dash line) is @ ~25828.

    YM Tick 123601 - shows the 12:36 time area on 15 tick to show price behaviour at this time and the preceding 2min bar period in greater detail i.e. 'inside the bars'

    The High of the previous (long red bar) 2 min bar (Look back period 1 from bar on which Alert reported Triggered 12:36:01 being the bar at 34 mins) is 25816. Even the bar before that has a high of 25821, which is the previous high area that can be seen on the Tick chart.

    I have some uncertainties as to the meanings and impacts of 'High' and 'Look back period' that may affect what my expectations of the Alert should be, but leaving those aside, and starting with an 'absolute - The OHL Day Current High (second Condition) is a fixed constant at 25828. There is no room for misinterpretation of Definition of this for historical data.

    The first Condition is that 'Price' (whatever Price and whenever that may be) crosses above 25828. The Offset is -5 ticks. For the Condition Relational operator 'Crosses above', that means must be 25829, at 25828 it has not crossed above. With -5 Offset, that means the Data Series Price must reach 25824 to trigger. As can be seen on the Tick chart, at no time within the 'current' when triggered bar or previous two/recent history did price reach 25824

    I am not clear what Look back period means/effect is in this context. Does it mean ''Price' is current bar and one bar back'? i.e. in this example. if price meets the condition in this current bar OR it did so in the last bar, trigger the alert on this bar? (which would have the effect of 'extending the longevity' of the Alert i.e. it would Alert on the bar the condition was met, and also alert on the next bar because the condition would be true Looking back one bar. But that doesn't seem to be what is happening (I'd get 2 Alerts up to a maximum of 2 mins apart each time a Condition was met, one when the condition was met on the current bar, and one immediately the next bar opened because the Look back period 1 bar condition would be met at the open of the new bar). Or 'during this bar, if the condition was met in the last bar, trigger the Alert? This seems plausible and consistent with the number of Alerts and with the fact that the Alert has a time stamp of 01 seconds- i.e. as soon as the bar on which the Alert was triggered, the Current bar, opened the condition was met. This seems to suggest the condition was met because the bar opened, not because the actual condition itself was met - which is Data Series Price Bars ago 0 i.e. current bar, High of price, minus 5 ticks Offset. Certainly that did not happen to meet the second Condition OHL Current High at 12:36:01 or ever, in the Current bar or with a Look back period of 1. To my mind there may be a clue in the :01 Second timestamp. Is it generating the Alert at 12:36:01 not because the First Condition is met at that time, but because the bar opened. Although it wasn't, because price never reached 5 tick below the OHL, then, or at any time in the current or last bar. So that is another matter.

    However, that means the Condition was met up to 2 mins (with Alert on 2 minute chart) before the Alert was triggered (and the Look back cannot be set to 0 look back).
    None of this is apparent in Help, Look back period is not even mentioned. Once. And it seems non-sensical to me to have a (First) Condition specified on Current Bar/Price High, Bars Ago 0, Offset -5 that in fact isn't based on this at all because of Look back Period 1.

    Why I would want an Alert that tells me the Condition I want to be alerted to happened in a previous bar, but cannot tell me as it happens is as yet a mystery to me if this is indeed how it works. It is not a very alert Alert.

    Anyhow, the first is to try to explain what is happening - it seems Price never met the Condition with or without Offset and either in the current bar or looking back one.
    That seems irrefutable, else I'm losing my mind.

    NOTE: that I have many Alerts of this type i.e. Alert when price gets within 5 ticks of OHL and most of the time they seem to work as expected, and certainly many trigger NOT at timestamp :01 seconds i.e. on opening of the bar. So that may be co-incidental, but it doesn't change the fact that the price condition doesn't seem to have been met at any time within the current and look back one bar,

    Looking forward to understanding/my misunderstanding.
    Hope this helps, for the OP's issue also

    Kind regards,
    Attached Files
    Last edited by brucerobinson; 08-27-2018, 03:00 AM.

    #2
    Bruce, I moved your post to its own thread so as to keep the original thread focused on the precise issue the original poster had mentioned.

    What is the yellow dash line at 25815? It looks like it may be a price line for the current last price. Is that correct? If not, what is it?

    Your screenshot of the alerts shows 'If Any' meaning 'If Either'. Your conditions are one for a high cross and one for a low cross. What occurs if you have only one condition instead of two?

    The timestamp calculation items you mention is two things; One is the 'If Any' re-arm type above and the other is your re-arm mode. The rearm mode is calculating on the close of the bar so it waited for that first tick of the new bar to close.

    Lookback is the number of bars to look back for the cross comparison. For example, If you lookback 0 bars then how do you know what the value to compare against was previously? A lookback of 0 would be invalid in this case.
    Patrick G.NinjaTrader Customer Service

    Comment


      #3
      Hello Patrick and thanks.
      Moving to thread - no problem, thanks. I originally added to the OP because I had concrete screenshot examples to offer of what is at least to me unfathomable, albeit not the exact same as OP.

      'Yes-ish'. It isn't Ninja's Platform Priceline indicator, it is an SMA set to1 as I added it before you developed Priceline and wanted a way without 3rd-party ;-)

      "Your screenshot of the alerts shows 'If Any' meaning 'If Either'. Your conditions are one for a high cross and one for a low cross. What occurs if you have only one condition instead of two?"

      I don't know because I haven't tried it. As you may recall I have of the order of 200 Alert Conditions set up. The vast majority the vast majority of the time, as far as I can tell, trigger as expected, expected insofar as I can reverse engineer what the Help describes, where it does. They are all configured in the same manner as previously sent, with the exception of two ways of skinning the cat - see attached (at the time of setting about, I did not have an idea as to any relative merits of either approach). I'm not aware of either configuration acting differently, but both have multiple 'If Any Conditions' so don't help answer your question. Just FYI, best I can offer.
      But behind your question is 'is there a problem when using two when there shouldn't be a problem? Yes? i.e. the Alerts are configured correctly for what I am wishing to achieve?
      If Either:
      Data Series price - 5 crosses OHL Current high
      or If:
      Data Series price +5 crosses OHL Current low
      is correct configuration? you're asking if there may be any indication it is configured correctly but not working as expected.

      As I say, with around 200 and triggering say 5 times per day then that's 1,000 instances. I don't trade all day and I don't look every instance, but most of the time when I do they are as expected. Occasionally, and why I captured and sent I haven't understood why triggered. This seems to me to be such a case. Price is nowhere near being able to be triggered for the low condition, so a good example.

      "The timestamp calculation items you mention is two things; One is the 'If Any' re-arm type above and the other is your re-arm mode. The rearm mode is calculating on the close of the bar so it waited for that first tick of the new bar to close."
      I'm not sure I understand this, don't know it matters as long as it isn't the problem - I think what you mean is one time stamp occurs (when the condition is met/ the Alert Action is triggered) which is real-time as it happens to the tick, and the other is to do with when it re-arms. However I can't see what rearm mode has to do with when the Alert is triggered or sent? Correct me if I misunderstand. What you distinguish, it seems to me, as Re-arm mode, is what it says above is Rearm Type, on bar close. I'm not be pedantic nor is it semantics - I understand that it waits for the bar to close, thus 12:36:01, but how is that related to timestamp? Were talking about the Alert message timestamp, not when it rearmed?

      "Lookback is the number of bars to look back for the cross comparison. For example, If you lookback 0 bars then how do you know what the value to compare against was previously? A lookback of 0 would be invalid in this case."
      The Condition is whether or not Price has crossed an indicator value, in this case the Current High or Low. As I already wrote, these are fixed an absolute values. The Current high and Current Low as determined by the indicator are Current High and Current Low whether that be the tick immediately up until the current tick.

      "For example, If you lookback 0 bars then how do you know what the value to compare against was previously? "
      What is the value of the Current OHL in the current bar? It is the current high, if the OHL indicator is set to either On price change or On each tick.

      "A lookback of 0 would be invalid in this case."
      No it would not, the Current High is exactly what it is defined as - and that is the current high. That is a matter of fact. A User may elect to display the High or Low at the Close of the previous bar, but that is their choice, it does not change what the Current High r Low is.
      I came across this when I first set up my Alerts and despite documentation giving an example of 0 Bars Lookback being valid, you subsequently told me it was not.
      In my enquiry here, I asked if it was looking 'within the current bar'

      What seems to be the case is that you are aware that the Alert does not look within the current bar yet are obfuscating and trying to argue that it would be invalid to do so.

      Please confirm this is what you are saying on this aspect (which would explain why I sometimes think the alert has alerted me about the condition being met the bar before the alert). What is INCORRECT is that a Look back period of 0 is invalid. It is ONLY with a Look back period of 0 that the Condition can be compared with the Indicator Value Current high with the Indicator set to On price change or On each tick. Which is what the Condition as created is.

      What it still does not explain is how the Alert was triggered in the case I have given you, where price never went near the condition?

      Kind regards
      Attached Files

      Comment


        #4
        Hello brucerobinson,

        Thank you for your response.

        I suspect that the Alert triggered when it should not have due to the 'If Any' setting. Can you test the condition for the High CrossAbove in an Alert by itself without any other condition added? Do you still see the same behavior?

        The alerts you show in your screenshots appear to be configured correctly.

        The 'Re-Arm' is waiting for the close of the bar. The bar does not close until the first tick of the new bar and thus the current time is not that of the prior closed bar.

        The Lookback item I was incorrect on, it will work with the 0 in order to look within the current bar for a cross. It does mean to look back how many bars, in the case of 0 it only looks to the current bar.

        Please let me know the result of your test.
        Patrick H.NinjaTrader Customer Service

        Comment


          #5
          Hello PatrickX,
          I'm not sure of the continuity of whom I am communicating with as previously the moniker was PatrickG below, yet the response from PatrickH referring to that from PatrickG says 'The lookback period I was incorrect on'. You mean PatrickG was incorrect on? Or are you one and the same.
          As if this isn't confusing enough.

          Anyhooo….

          "The alerts you show in your screenshots appear to be configured correctly."
          I have done my job. Thank you for checking and confirming not user configuration error.

          "I suspect that the Alert triggered when it should not have due to the 'If Any' setting."
          Presumably you must have reason to suspect this i.e. why such could cause it to, rather than just a wild stab in the dark. Which by implication and that I have configured correctly would mean faulty software design.
          And, you have the benefit of access to the coding logic.

          "Can you test the condition for the High CrossAbove in an Alert by itself without any other condition added?"
          Yes I can, as can you. I have configured the software correctly and it would appear to us both that it is not working correctly. I think the onus lies with Ninjatrader to take the information given, determine why with the benefit of knowledge of how it is coded, and how to fix it.

          "The Lookback item I (PatrickX) was incorrect on, it will work with the 0 in order to look within the current bar for a cross. It does mean to look back how many bars, in the case of 0 it only looks to the current bar."

          That would be what is required.

          I refer you tp the Help section on Alerts, Crossover Conditions
          https://ninjatrader.com/support/help...-us/alerts.htm

          Cross Over Conditions
          You can check for either a Cross Above or Cross Below condition with a user defined look back period. The look back period sets the number of bars to look back to check for the cross over condition.

          The following is an an example and represents one of many possible combinations. We have already added two EMA indicators (9 period EMA and 20 period EMA) to our chart so they are both available as condition objects.

          1.
          Under the Indicators category, select the 9 period EMA indicator
          2.
          Select "cross above" relational operator
          3.
          Set the Look back period
          4.
          Under the Indicators category, select the 20 period EMA indicator


          Note: The Look back period must be at least 1 to function."

          So what is it to be? Does anyone have a clue?

          When I originally made what has turned out to currently be a hugely time-costly mistake of setting up Alerts, they did not behave as expected. I reported this and eventually was told that this value could not be 0. I pointed out that Help gave an example with 0 that I had followed. I was told Help did not, it used 1. I copied the offending example showing 0 from Help and sent to Support and it was rapidly and perhaps with hindsight hastily amended to what you see now. I then changed all my (200) Alert Conditions to 1. Thereafter, Ninja pushed out an update that broke them all. I rebuilt them. Ninja broke them again. I did wonder whether it was comparing current and last bar price, as described below. However I was losing the will to live, so left alone.

          Now, you are telling me it can be 0.

          And I am to test to try to figure out what is going on with your software? Blind.

          This is quite simply diabolical and an appalling way to treat customers when there are clearly faults with the software.

          Logic (which I have explained) MUST compare current price in real time (0 Bars ago) against the absolute and fixed value that is the OHL Indicator Current High (0 Bars ago), in the case when the High is On price change or On each tick.

          It may (and should) be that the Look back period can in fact be 0, the Help documentation was originally correct, the reason the Alerts were not at that time working was nothing to do with this (to do with the reason for the fix pushed out that broke everything) and was thus incorrectly amended in Help to the current 1. Or, it may be that for some design fault the Look back period must be 1 yet with 1 it does in fact compare current price against OHL Current real time 0 bars ago. Who knows? Apparently no-one at Ninjatrader.

          Kindly figure it out with Development and update Help documentation to avoid others from this abuse.

          And then ditto on 'If any' with one Condition, to figure out how my currently configured Alerts are working, if they must use Look back 1 AND they DO look back 1 then I would have to use them on a 1 second chart, otherwise they are alerting me up to 2 minutes after the event on a 2 minute chart, and also hopefully eventually understand the reason for the 'false trigger'.

          What a mess and debacle,

          Please let me know the results of your test

          Kind regards,

          Comment


            #6
            Hello brucerobinson,

            Thank you for your response.

            I provided the incorrect information on the lookback period to my college Patrick G. Apologies for the confusion.

            Your alerts are set up properly from what we can see in your screenshots. And we have not had any failed alerts on our end in testing.

            The items asked were in hopes of isolating the matter. I can take a look at the Log and Trace for any other items that may have occurred during that time. If I do not find those items I need to attempt to break the matter down further.

            You can do this by going to the Control Center-> Help-> Email Support. Ensuring 'Log and Trace Files' is checked will include these files. This is checked by default.

            Please list 'ATTN: Patrick H' in the subject line and reference this thread in the body of the email.

            I look forward to your response.
            Patrick H.NinjaTrader Customer Service

            Comment


              #7
              Hello Patrick and thanks.

              "Your alerts are set up properly from what we can see in your screenshots. And we have not had any failed alerts on our end in testing."

              To be clear the issue reported was not a failed alert insofar as not failing to trigger when conditions met. Rather triggering when conditions clearly were not met. That, I guess, is a 'failed' alert, or failure of an alert to behave as expected.

              As I articulated at the outset of providing feedback, this is an unusual occurrence, but I believed it happens occasionally and was able to capture all details and the chart and settings.

              If you do not wish to identify why the alert is 'failing' i.e. false trigger, then that it is up to Ninjatrader.

              I provided the information because other users have reported similar.

              There is nothing to be found in my Log and Trace files, I have already looked.

              I still don't have a clear answer to how the Look back period, Bars Ago 0 and On Price change and On each tick interact, other than several changes in answer to the Look back period value required, but not how they interact and the implications.

              However it is off the original topic which was triggering when conditions not met so I will start a new thread and reference this one.

              Kind regards,

              Comment


                #8
                Hello brucerobinson,

                Thank you for your response.

                I will continue to test the alerts for failures.

                Originally posted by brucerobinson View Post
                I still don't have a clear answer to how the Look back period, Bars Ago 0 and On Price change and On each tick interact, other than several changes in answer to the Look back period value required, but not how they interact and the implications.
                The lookback period is the number of bars. 1 indicates to allow the condition to look back at the previous bar, 0 indicates to only look at the current bar.

                If I use a 0 for lookback then the condition is only checked within the current bar. If I am checking the Close crossing another value then it is checking the last price versus the current price.

                If I use a 1 for lookback then condition will not only check the current bar but will look to see where the price was on the prior bar as well.

                Please let me know if you have any questions.
                Patrick H.NinjaTrader Customer Service

                Comment


                  #9
                  Hello Patrick and thanks.

                  "If I use a 0 for lookback then the condition is only checked within the current bar."

                  "If I am checking the Close crossing another value then it is checking the last price versus the current price."
                  If you are checking the Close with a 0 look back then there is no Close during the current bar because it has not closed. This does not make any sense to me. But I don't see the point in trying to understand it when it is not what I am doing, whether 0 Look back period or 1 Look back period.

                  I think it would be more useful to use for illustration the example that I am working with, not one that I am not.

                  I have attached my Alert settings again.

                  To re-describe what I am seeking from the alert in plain English.
                  I want an Alert to sound when at any point current price in real time crosses above 5 ticks below the OHL Current High. This is so that if that happens on an instrument that is not in the workspace currently selected, I am notified with an audible Alert and can switch to the workspace with the instrument with which this is occurring.
                  Not 'If the bar Close crosses above the EMA...." I am not interested in whether or where the bar Closed. I am interested in knowing what real-time price is doing compared with an indicator value (in this case the Current High of an OHL Indicator), on a chart I can't see.
                  This Alert/Condition is not the basis of an Entry that I am trying to code into a strategy, triggering an order etc where someone might be interested in so-called 'confirmation' of a bar having closed as part of their Rules. 'If the bar closes below the EMA, enter 3 contracts short' etc.

                  Please tell me what settings I should use for each of the Fields to achieve what I have described as my objective, or confirm that the settings as attached will achieve the desired objective described.

                  Kind regards,
                  Attached Files
                  Last edited by brucerobinson; 08-29-2018, 03:21 PM.

                  Comment


                    #10
                    Hello brucerobinson,

                    Thank you for your response.

                    You have the proper settings for that condition to return true in the current bar if the high crosses 5 ticks above the indicator's value of 'Current high'.

                    Please let me know if you have any questions.
                    Patrick H.NinjaTrader Customer Service

                    Comment


                      #11
                      Hello Patrick,
                      Thank you for your assistance.
                      And to confirm the final part of the puzzle...
                      If I have a Look back period of 1 rather than 0, it will look for the Condition being met both in the previous bar and in the Current bar
                      - if the Condition was met in the previous bar, as soon as the current bar opens it will trigger the alert, and then will not trigger if the condition is met in the Current bar (because Re-arm type On bar close - the alert will have triggered due to the previous bar Look back period 1 condition having been met and will not re-arm until the next bar)

                      In which case if met in the previous bar, it will alert to tell me again that it was met in the previous bar up to 2mins ago (on 2min Data Series), but will not tell me if met thereafter on the current bar.

                      So I need to change all 200 Conditions to Look back period 0.

                      I originally had them set to 0, per the documentation use case example for Cross Above/Below at that time, was told could not be 0, documentation changed, changed all to Look back 1, subsequently variously told could and couldn't be 0, and now have to change all back to what I had originally, 0.

                      It doesn't make for pretty reading, or Support experience.

                      Thank you for your endurance.

                      Kind regards,

                      Comment


                        #12
                        Hello brucerobinson,

                        Thank you for your patience
                        If I have a Look back period of 1 rather than 0, it will look for the Condition being met both in the previous bar and in the Current bar.
                        That is correct.

                        Please let me know if you have any other questions.
                        Patrick H.NinjaTrader Customer Service

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by martyn73, Today, 08:56 AM
                        0 responses
                        1 view
                        0 likes
                        Last Post martyn73  
                        Started by TazoTodua, Today, 06:16 AM
                        0 responses
                        5 views
                        0 likes
                        Last Post TazoTodua  
                        Started by clergyab, Today, 04:31 AM
                        0 responses
                        5 views
                        0 likes
                        Last Post clergyab  
                        Started by ouhoouho, Today, 04:00 AM
                        0 responses
                        2 views
                        0 likes
                        Last Post ouhoouho  
                        Started by adsjons, Today, 03:41 AM
                        0 responses
                        3 views
                        0 likes
                        Last Post adsjons
                        by adsjons
                         
                        Working...
                        X