Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Do you want to deliver an arbitrary value in CrossAbove?

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

    Do you want to deliver an arbitrary value in CrossAbove?

    The first argument of CrossAbove seems to be able to use only an established function of IDataSeries type and is troubled with oneself not to be able to use a function and the value that I made. How may you hand a function and the first value that you created by yourself in CrossAbove if you do it to an argument?
    Please teach it.

    Syntax
    CrossAbove(IDataSeries series1, double value, int lookBackPeriod)

    How to use wrong CrossAbove(The first argument is an own work function)
    CrossAbove(V1(20),V2(30), int 1)

    How to use right CrossAbove(A function established the first argument)
    CrossAbove(SMA(10),V2(30), int 1)

    ##Examples
    protected override void OnBarUpdate()
    {

    //How to use CrossAbove is right for an error(The first argument is an own work function)
    if (CrossAbove(V1(20),V2(30),1))
    EnterLong();
    }

    public double V1(int vle)
    {

    return 5*vle;
    }

    public int V2(int vle)
    {

    return 10*vle;
    }

    #2
    Hello,

    You will need to return an IDataSeries value for the argument like it shows in this link:
    DenNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by jaybedreamin, Today, 05:56 PM
    0 responses
    3 views
    0 likes
    Last Post jaybedreamin  
    Started by DJ888, 04-16-2024, 06:09 PM
    6 responses
    18 views
    0 likes
    Last Post DJ888
    by DJ888
     
    Started by Jon17, Today, 04:33 PM
    0 responses
    1 view
    0 likes
    Last Post Jon17
    by Jon17
     
    Started by Javierw.ok, Today, 04:12 PM
    0 responses
    9 views
    0 likes
    Last Post Javierw.ok  
    Started by timmbbo, Today, 08:59 AM
    2 responses
    10 views
    0 likes
    Last Post bltdavid  
    Working...
    X