Calculate moving average on price change rather than on bar close

This commit is contained in:
moshferatu 2024-06-07 06:11:26 -07:00
parent c564ee3fe2
commit de3397870e

View File

@ -1,13 +1,9 @@
#region Using declarations
using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Windows.Media;
using System.Xml.Serialization;
using NinjaTrader.Cbi;
using NinjaTrader.Gui;
using NinjaTrader.Gui.Chart;
using NinjaTrader.NinjaScript;
#endregion
// Do not change the namespace.
@ -21,8 +17,9 @@ namespace NinjaTrader.NinjaScript.Indicators
{
if (State == State.SetDefaults)
{
Description = "Simple moving average indicator";
Description = "Basic moving average indicator";
Name = "Moving Average";
Calculate = Calculate.OnPriceChange;
IsOverlay = true;
IsSuspendedWhileInactive = true;
Period = 20;