Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Array in CrossAbove /Below

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

    Array in CrossAbove /Below

    Hello,

    i have an inddicator, which use an array.
    I have processed this indicator into a strategy and would now like to trigger a buy signal when the arrays are crossed. Unfortunately I can't get any further now. Can someone help here, please?

    regards
    Attached Files

    #2
    Hello Lopat,

    From the image it looks like you have just incorrectly used the double values here, you would need to remove the BarsAgo from each of the Values statements.

    Code:
    if (CrossAbove(Values[0], Values[1] , 1))
    https://ninjatrader.com/support/help...sub=crossabove

    Values (plural) is the collection of plot series and the Cross methods are looking for two Series<double> objects to compare.


    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Hi Jesse,
      thank you it is working.

      I hope you can help me with my other question, too. The Strategy with the mentioned indicator use to calculate the indicator Value tick data. Simply I use two SMA but with the tick Data it produceses plenty of trades every time the SMAs crosses while it calculates. Can I implement something just to use my strategy and indicator by tick but to place a trade on bar close?

      thank you.
      Attached Files

      Comment


        #4
        Hello Lopat,

        Yes you could use a few items here. One is IsFirsstTickOfBar, that would allow doing something once per bar on the first tick. You could also use BarsInceEntryExecution here.

        https://ninjatrader.com/support/help...ub=isfirsttick
        https://ninjatrader.com/support/help...tsub=barssince

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by WeyldFalcon, Today, 02:07 PM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_ThomasC  
        Started by hfwiley, Today, 03:02 PM
        2 responses
        16 views
        0 likes
        Last Post hfwiley
        by hfwiley
         
        Started by pdennis, Today, 02:34 PM
        3 responses
        15 views
        0 likes
        Last Post NinjaTrader_ChrisL  
        Started by tonynt, Today, 01:47 PM
        3 responses
        17 views
        0 likes
        Last Post NinjaTrader_Kate  
        Started by WesFoster, Today, 12:39 PM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_Dennis  
        Working...
        X