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 llanqui, 04-28-2024, 10:32 AM
    10 responses
    38 views
    0 likes
    Last Post llanqui
    by llanqui
     
    Started by cmtjoancolmenero, 04-29-2024, 03:40 PM
    20 responses
    65 views
    0 likes
    Last Post cmtjoancolmenero  
    Started by llanqui, Today, 11:13 AM
    5 responses
    7 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by samish18, 04-17-2024, 08:57 AM
    27 responses
    118 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Started by ETFVoyageur, 04-30-2024, 02:04 PM
    7 responses
    46 views
    0 likes
    Last Post eDanny
    by eDanny
     
    Working...
    X