• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Query. Support request.

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

    Query. Support request.

    Hi,

    How do I use a "condition set" in a formula? (See below.) Lets say I want the Plot0.Set to give me a numeric "1" when the ChaikinMoneyFlow(21)[0] > 0 and to give me a numeric "0" when ChaikinMoneyFlow(21)[0] < 0 .
    Thanks...

    // Condition set 1

    if (ChaikinMoneyFlow(21)[0] > 0)
    {
    Variable0 = 1;
    }

    // Use this method for calculating your indicator values. Assign a value to each
    // plot below by replacing 'Close[0]' with your own formula.

    double pc = HMA ( Close , LongTerm ) [0];
    double pr = SMA ( Close , ShortTerm ) [0];
    Plot0.Set(pc - pr);

    #2
    Shawn, you could do somthing like this to assing the plotted binary values then -

    Code:
     
    if (ChaikinMoneyFlow(Close, 10)[0] > 0)
    Plot0.Set(1);
    
    if (ChaikinMoneyFlow(Close, 10)[0] < 0)
    Plot0.Set(0);
    BertrandNinjaTrader Customer Service

    Comment


      #3
      reply

      Thanks. I'll try it out...

      Comment


        #4
        How do i use multiple indicators?

        How do i use multiple indicators? Is this the right formula?

        if (ATR (Close, 10)[0] > 5)
        if (MFI (Close, 10)[0] > 12)
        if (ChaikinMoneyFlow(Close, 10)[0] > 0)
        Plot0.Set(1);

        Thanks Bertrand...

        Comment


          #5
          No, please work with -

          Code:
          if (ATR (Close, 10)[0] > 5 && MFI (Close, 10)[0] > 12 && ChaikinMoneyFlow(Close, 10)[0] > 0)
          Plot0.Set(1);
          BertrandNinjaTrader Customer Service

          Comment


            #6
            Thanks Again

            Thanks again...

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by cary1267, Today, 09:37 AM
            1 response
            12 views
            0 likes
            Last Post NinjaTrader_ShawnB  
            Started by nfsolutions, Today, 06:41 AM
            1 response
            15 views
            0 likes
            Last Post NinjaTrader_ShawnB  
            Started by kiwidtrader, Yesterday, 11:49 PM
            1 response
            7 views
            0 likes
            Last Post NinjaTrader_ShawnB  
            Started by kylef, Today, 11:36 AM
            2 responses
            31 views
            0 likes
            Last Post NT-Roland  
            Started by ivan2007007, Today, 12:55 PM
            2 responses
            11 views
            0 likes
            Last Post Bidder
            by Bidder
             
            Working...
            X