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

Channel Scalper

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

    Channel Scalper

    Dear All,
    I am trying to find thow following indicator for NT, anyone know if it is available, or how to comvert it to NT ?


    your help is highly appreciated
    Regards
    Guss

    #2
    here is the script for Metatrader4


    #property indicator_chart_window
    #property indicator_buffers 4
    #property indicator_color1 Orange
    #property indicator_color2 Orange
    #property indicator_color3 Yellow
    #property indicator_color4 Yellow
    #property indicator_width2 1
    #property indicator_width4 1
    #property indicator_width1 2
    #property indicator_width3 4

    int period = 11;
    int appliedPrice = PRICE_CLOSE;
    double multiplier = 2.0;

    //
    //
    //
    //
    //

    double TrendU[];
    double TrendUA[];
    double TrendD[];
    double TrendDA[];
    double Direction[];
    double Up[];
    double Dn[];

    //+------------------------------------------------------------------+
    //| |
    //+------------------------------------------------------------------+
    //
    //
    //
    //
    //

    int init()
    {
    IndicatorBuffers(7);
    SetIndexBuffer(0, TrendU);
    SetIndexBuffer(1, TrendUA); SetIndexStyle(1,DRAW_NONE);
    SetIndexBuffer(2, TrendD);
    SetIndexBuffer(3, TrendDA); SetIndexStyle(3,DRAW_NONE);
    SetIndexBuffer(4, Direction);
    SetIndexBuffer(5, Up);
    SetIndexBuffer(6, Dn);

    SetIndexLabel(0,"");
    SetIndexLabel(1,"");
    SetIndexLabel(2,"");
    SetIndexLabel(3,"");
    IndicatorShortName("");
    period = MathMax(1,period);
    }
    int deinit()
    {
    return(0);
    }




    //+------------------------------------------------------------------+
    //| |
    //+------------------------------------------------------------------+
    //
    //
    //
    //
    //

    int start()
    {
    int counted_bars = IndicatorCounted();
    int limit,i;

    if(counted_bars < 0) return(-1);
    if(counted_bars > 0) counted_bars--;
    limit = Bars-counted_bars;

    //
    //
    //
    //
    //

    for(i = limit; i >= 0; i--)
    {
    double atr = iATR(NULL,0,period,i);
    double cprice = iMA(NULL,0,1,0,MODE_SMA,appliedPrice,i);
    double mprice = (High[i]+Low[i])/2;
    Up[i] = mprice+multiplier*atr;
    Dn[i] = mprice-multiplier*atr;

    //
    //
    //
    //
    //

    Direction[i] = Direction[i+1];
    if (cprice > Up[i+1]) Direction[i] = 1;
    if (cprice < Dn[i+1]) Direction[i] = -1;

    TrendU[i] = EMPTY_VALUE;
    TrendUA[i] = EMPTY_VALUE;
    TrendD[i] = EMPTY_VALUE;
    TrendDA[i] = EMPTY_VALUE;

    if (Direction[i] > 0) { Dn[i] = MathMax(Dn[i],Dn[i+1]); TrendU[i] = Dn[i]; if (Direction[i] != Direction[i+1]) TrendUA[i] = TrendU[i];}
    else { Up[i] = MathMin(Up[i],Up[i+1]); TrendD[i] = Up[i]; if (Direction[i] != Direction[i+1]) TrendDA[i] = TrendD[i];}
    }
    return(0);
    }

    Comment


      #3
      Guss, unfortunately I'm not aware of this exact indicator already available in NinjaScript - have you looked through the sharing section?

      BertrandNinjaTrader Customer Service

      Comment


        #4
        Bertrand,
        I did some search on the forum, but no results, I Will try to look under the link you just posted
        Thanks for your response

        Guss

        Comment


          #5
          NO luck

          Comment


            #6
            If you could not a good script as a starting point in the sharing you could always contact a consultant to do the conversion needed for you :

            BertrandNinjaTrader Customer Service

            Comment


              #7
              Thanks you, will wait for now, hoping someone will come up with the script

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Stanfillirenfro, Today, 07:23 AM
              9 responses
              23 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by George21, Today, 10:07 AM
              0 responses
              6 views
              0 likes
              Last Post George21  
              Started by DayTradingDEMON, Today, 09:28 AM
              2 responses
              16 views
              0 likes
              Last Post DayTradingDEMON  
              Started by navyguy06, Today, 09:28 AM
              1 response
              6 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Started by cmtjoancolmenero, Yesterday, 03:58 PM
              8 responses
              32 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Working...
              X