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

IsRising and IsFalling does not seem to work...please help.

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

    IsRising and IsFalling does not seem to work...please help.

    I have set up a strategy that relies on the trend of the EMA. In order to accomplish this, I want to check the previous EMA one bar ago to verify that the EMA is rising before I go long or falling before I go short. I thought I had it set up correctly, but during my testing the IsRising and IsFalling conditions seem to be ignored. I have attached an image of the IsRising setup I have deployed.

    I hope you can help me out... Thanks!
    Attached Files

    #2
    Hello jmyonan3,

    How are you currently checking if the condition is true?

    If you are trying to do an action that may be part of the reason in case you are not seeing a result. You could make a empty set with an action of Misc -> Print and then output the value of IsRising, that would you look at all bars to see if it ever becomes true.


    JesseNinjaTrader Customer Service

    Comment


      #3
      Hello Jesse.

      I assume IsRising and IsFalling is a function and they work correctly. These functions test whether a line is going up or going down. I am placing the EMA 21 as its only parameter. I would expect that if I am inserting the IsRising function, and the EMA 21 is going up from left to right, it is rising and should result in a True value. Conversely, If the EMA 21 line is going down from left to right (and not flat), and I insert the IsFalling function with the EMA 21 into the Series 1, it should result in a True value...right?

      Sorry...I was not able to locate Print.

      Comment


        #4
        Hello jmyonan3,

        I wouldn't be able to tell you if that would be true or not on the given details, we really can't make assumptions when programming. The easiest way to figure out the problem would be to use the platforms built in output known as Print. That would let you physically see what values are being observed by the strategy. In the strategy builder that is under the Actions as Misc -> Print. You can open the output window by using the control center New -> NinjaScript output.

        The Rising and Falling methods compare if the current bar is greater/lesser than the last bar. https://ninjatrader.com/support/help...htsub=isrising

        You can additionally try the sample here: https://ninjatrader.com/support/help...htsub=isrising
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by algospoke, Yesterday, 06:40 PM
        2 responses
        23 views
        0 likes
        Last Post algospoke  
        Started by ghoul, Today, 06:02 PM
        3 responses
        14 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by jeronymite, 04-12-2024, 04:26 PM
        3 responses
        45 views
        0 likes
        Last Post jeronymite  
        Started by Barry Milan, Yesterday, 10:35 PM
        7 responses
        22 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by AttiM, 02-14-2024, 05:20 PM
        10 responses
        181 views
        0 likes
        Last Post jeronymite  
        Working...
        X