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

detecting "visual" crosses

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

    detecting "visual" crosses

    I have non standard situation and would like to ask for assistance/proposal how to solve this -

    say I have:
    - RSI that oscillates between 0 and 100. It has two levels defined at 25 and 75.
    - custom oscillator, that ranges something like -2285 to 411+.

    Using charts, if I drag custom oscillator on top of RSI, I have two oscillators in the same panel, I can see visually point where:
    1. those two intersects,
    2. custom oscillator crosses level 75 horizontal line (RSI draws this).
    Please see attached picture.

    Now problem:

    how to find out algorithmically two intersection/cross points mentioned above?

    You see, custom indicator can cross RSI say at level -1860 (MINUS!) while RSI at cross point is at 14.5 (RSI never goes to minus values). We have mismatching coordinate system here, and mismatching ranging amplitude, however Ninja is capable to work around this problem on chart. In short - I visually see crosses, but how to catch these with Ninjascript?

    If I knew principles how Ninja superimposes oscillators in such cases that may help to find solution if there is no one yet.

    Thank you.
    Attached Files

    #2
    Does algebra using proportions come close?







    Originally posted by andrius View Post
    I have non standard situation and would like to ask for assistance/proposal how to solve this -

    say I have:
    - RSI that oscillates between 0 and 100. It has two levels defined at 25 and 75.
    - custom oscillator, that ranges something like -2285 to 411+.

    Using charts, if I drag custom oscillator on top of RSI, I have two oscillators in the same panel, I can see visually point where:
    1. those two intersects,
    2. custom oscillator crosses level 75 horizontal line (RSI draws this).
    Please see attached picture.

    Now problem:

    how to find out algorithmically two intersection/cross points mentioned above?

    You see, custom indicator can cross RSI say at level -1860 (MINUS!) while RSI at cross point is at 14.5 (RSI never goes to minus values). We have mismatching coordinate system here, and mismatching ranging amplitude, however Ninja is capable to work around this problem on chart. In short - I visually see crosses, but how to catch these with Ninjascript?

    If I knew principles how Ninja superimposes oscillators in such cases that may help to find solution if there is no one yet.

    Thank you.

    Comment


      #3
      yes, but what are absolute min max? Those visible on chart at the moment? How do I get "visible" interval? I need to know principles how Ninjatrader superimposes one indie on another. What is proper solution here? Question to staff.

      Comment


        #4
        Hi andrius, interesting task and approach - there's unfortunately no easy solution here, since your relationship between the 2 very different studies (range bound vs 'open') depends on the relative scaling you assign to them via the chart. I think you can look into calculating a scale factor that would attempt to bring the RSI value in the range of the other study, but it would have to an average over the last x bars likely to not introduct too much erratic behavior. I think it's questionable if the approach can lead to valid signals since their triggering would be affected by arbitaray variables.
        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by timmbbo, Today, 08:59 AM
        1 response
        2 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by KennyK, 05-29-2017, 02:02 AM
        2 responses
        1,281 views
        0 likes
        Last Post marcus2300  
        Started by fernandobr, Today, 09:11 AM
        0 responses
        2 views
        0 likes
        Last Post fernandobr  
        Started by itrader46, Today, 09:04 AM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_Clayton  
        Started by bmartz, 03-12-2024, 06:12 AM
        5 responses
        33 views
        0 likes
        Last Post NinjaTrader_Zachary  
        Working...
        X