'NinjaTrader.NinjaScript.Strategies.Strategy.Secon dEntry(int, int, int, int, int, bool, bool, bool, bool, string, System.Windows.Media.Brush, System.Windows.Media.Brush, System.Windows.Media.Brush, System.Windows.Media.Brush, System.Windows.Media.Brush, System.Windows.Media.Brush, System.Windows.Media.Brush)' is a 'method' but is used like a 'type'
my strategy snippet: and you can clearly see i can bring in my legCountRev 2 and EMA, but I cannot bring in the "SecondEntry".
namespace NinjaTrader.NinjaScript.Strategies
{
[CODE]public class ScenarioPlay : Strategy
{
private LegCountRev2 legCount;
private SecondEntry s2; //error with that
private EMA ema21;
private double signBarStrength = .65;
private Order currentOrder;
private Boolean inTrade = false;
public int scalpTick = 8;
protected override void OnStateChange()
{
if (State == State.SetDefaults)
{
Description = @"Enter the description for your new custom Strategy here.";
Name = "ScenarioPlay";
Calculate = Calculate.OnEachTick;
EntriesPerDirection = 1;
EntryHandling = EntryHandling.AllEntries;
IsExitOnSessionCloseStrategy = true;
ExitOnSessionCloseSeconds = 30;
SecondEntry Snippet:
//This namespace holds Indicators in this folder and is required. Do not change it.
namespace NinjaTrader.NinjaScript.Indicators.PAT
{
public class SecondEntry : Indicator
{
#region variables
private double pivotHigh = 0;
private double pivotLow = 9999999;
private double lastHigh = 0;
private double lastLow = 9999999;
private double longRisk = 0;
private double shortRisk = 0;
private double longPos = 0;
private double shortPos = 0;
private double longTarget = 0;
private double longStop = 0;
private double shortTarget = 0;
private double shortStop = 0;
private double longPrice = 0;
private double shortPrice = 0;
private int legDown = 1;
private int legUp = 1;
private int lastBarS = 0;
private int lastBarL = 0;
private int upLabel = 0;
private int downLabel = 0;
private bool isUpLeg = true;
private bool isDownLeg = true;
private bool isLongEntry = true;
private bool isShortEntry = true;
private Brush riskL;
private Brush riskS;
private Brush empty = Brushes.Transparent;
#endregion
protected override void OnStateChange()
{
if (State == State.SetDefaults)
{
Description = @"Second Entry indicator";
Name = "Second Entry";
Calculate = Calculate.OnPriceChange;
IsOverlay = true;
DisplayInDataBox = true;
DrawOnPricePanel = true;
DrawHorizontalGridLines = true;
DrawVerticalGridLines = true;[/CODE]

Comment