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

Average Quick

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

    Average Quick

    Hello,

    my name is nacho and i am from spain. So, i am sorry if my english is not correct.

    I writte because i would like to know if anybody or ninja supporters has an average moving indicator.

    Could we help me?

    Thanks so much.

    Regards from Spain

    Nacho.

    #2
    Hi Nacho, welcome to our support forums!

    There are many MA's already available in NinjaTrader, which one are you looking for?

    Here are some additional ones from our sharing section - http://www.ninjatrader-support2.com/...arch=MA&desc=1

    Or are you referring to the QuickMA study published on another forum some time ago? Unfortunately I'm not aware of a version for NinjaTrader. You can post the code if you have it and I'm sure the community will take a look...
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Quick MA

      Originally posted by NinjaTrader_Bertrand View Post
      Hi Nacho, welcome to our support forums!

      There are many MA's already available in NinjaTrader, which one are you looking for?

      Here are some additional ones from our sharing section - http://www.ninjatrader-support2.com/...arch=MA&desc=1

      Or are you referring to the QuickMA study published on another forum some time ago? Unfortunately I'm not aware of a version for NinjaTrader. You can post the code if you have it and I'm sure the community will take a look...
      Hello,

      Thanks for your quick reply.

      I think code is what you can see in this web: https://www.sierrachart.com/supportb...ad.php?t=17807

      So, for indicator:

      //
      // Plots a fractional-bar Quick Moving Average
      // with the option to select gapless daily opens.
      //
      // copyright 2008 John McCormick jmactrader.com
      //
      // feel free to copy and use this code royalty free
      // as long as it retains the above acknowledge
      //

      inputs: Price(Close),
      Quick_Length(9),
      displace(0),
      gapless(0); // set gap to a non-zero value to skip over opening daily gaps

      Var: Length(maxlist(1,Quick_Length));

      // GapLess

      Vars: // gapless O,H,L,C where O=C[1]
      RelO(0),
      RelH(0),
      RelL(0),
      RelC(0),
      gap(0),
      Accum(0),
      WtMean(0);

      if date<>date[1] then begin
      gap = O-C[1];
      Accum = Accum+gap;
      end;

      RelO = O-Accum;
      RelC = C-Accum;
      RelH = H-Accum;
      RelL = L-Accum;

      // Gapless bars - end

      WtMean = (RelH+RelL+RelC)/3;

      // End Gapless

      if gapless=0
      then plot1[displace](FMA_Smooth(price,length),"FMA_Quick") else
      plot1[displace](FMA_Smooth(RelC,length)+accum,"FMA_Quick");



      Function:

      // generates very smooth and responsive moving average// copyright 2008 John McCormick jmactrader.com// feel free to copy and use this code royalty free // as long as you don't remove the above acknowledgement //Inputs: Price(numericseries), Length(numericsimple);Vars: j(0), workinglen(maxlist(1,absvalue(Length))), peak(workinglen/3), tot(0), divisor(0);Array: val[100](0);if workinglen>100 then workinglen=100; // use larger array to handle lengths over 100tot=0;divisor=0;for j=1 to floor(workinglen+1) begin if j<=peak then val[j]=j/peak else val[j]=(workinglen+1-j)/(workinglen+1-peak); tot=tot+price[j-1]*val[j]; divisor=divisor+val[j];end;if divisor<>0 then FMA_smooth=tot/divisor;

      Thanks for your help from Spain,

      Regards,

      Nacho

      Comment


        #4
        Hi Nacho, thanks for posting the code for this. Hopefully sombody can help you to convert it to NinjaScript.

        If you want to give this a shot yourself, these coding tutorials are a great start - http://www.ninjatrader-support.com/H...verview18.html
        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by chbruno, Today, 04:10 PM
        0 responses
        3 views
        0 likes
        Last Post chbruno
        by chbruno
         
        Started by josh18955, 03-25-2023, 11:16 AM
        6 responses
        436 views
        0 likes
        Last Post Delerium  
        Started by FAQtrader, Today, 03:35 PM
        0 responses
        6 views
        0 likes
        Last Post FAQtrader  
        Started by rocketman7, Today, 09:41 AM
        5 responses
        19 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by frslvr, 04-11-2024, 07:26 AM
        9 responses
        127 views
        1 like
        Last Post caryc123  
        Working...
        X