E-Mini SP 500

When I created this thread, I had way too much coffee in me, it still has exceptional value.
 
Volatility is being gamed by algos. So this could be why its being arbed out and seeing record low volatilities in equity indexes. Structural liquidations only thing that creates momentary spike in volatility before its reduced back to equilibrium. (Saudi liquidations)
 
2642 major upper channel line.
 

Attachments

  • 2642.jpg
    2642.jpg
    336.2 KB · Views: 407
Stay short below 2666 and long above 2666
 

Attachments

  • 4118.PNG
    4118.PNG
    418.4 KB · Views: 350
Last edited:
If you take a survey currently out of 100 people, 99 would say the market will make new monthly lows vs new monthly highs.
 
It's also possible it creates a bull flag/wedge, to continue the bull run. If you noticed, the US bonds/notes backed off. 10 year notes are under 2.8%.

All these flags and crap never work, only work in hindsight, would love to see one guys who has pulled these off consistently.
 
All these flags and crap never work, only work in hindsight, would love to see one guys who has pulled these off consistently.

This. 100%.

Supply & Demand, Support & Resistance. Everything else is just noise.
 
SP trade taken a short while ago. Not an indicator or pattern in sight. Stop moved to b/e shortly after, target moved down a touch ... and I still left money on the table.
 

Attachments

  • sp500-300418.PNG
    sp500-300418.PNG
    53.7 KB · Views: 447
  • sp500-300418-2.PNG
    sp500-300418-2.PNG
    53.6 KB · Views: 423
  • sp500-300418-3.PNG
    sp500-300418-3.PNG
    50.4 KB · Views: 452
volatility breakdown
 

Attachments

  • vol17.PNG
    vol17.PNG
    487.6 KB · Views: 379
  • es17.PNG
    es17.PNG
    613.2 KB · Views: 372
#region Using declarations
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Xml.Serialization;
using NinjaTrader.Cbi;
using NinjaTrader.Data;
using NinjaTrader.Indicator;
using NinjaTrader.Gui.Chart;
using NinjaTrader.Strategy;
#endregion
// This namespace holds all strategies and is required. Do not change it.
namespace NinjaTrader.Strategy
{
/// <summary>
/// Trades like a straddle/breakout algo
/// </summary>
[Description("Trades based on time intervals using pivots")]
public class LineInSand : Strategy
{
#region Variables
// Wizard generated variables
private double pricepivot = 3019.00; // Default setting for Pricepivot
private double pricepivotb = 3019.00;
private double pricepivotc = 3019.00;
private int tickprofit = 160; // Default setting for Tickprofit
private int tickstoploss = 16; // Default setting for Tickstoploss
private int trailtick = 40; // Default setting for Trailtick
private int quantity = 1;
private int starttime = 180000;
private int stoptime = 240000;
private int starttimeb = 1;
private int stoptimeb = 100000;
private int starttimec = 100100;
private int stoptimec = 160000;
private int startdate = 20190101;
private int stopdate = 20191231;
private int startdateb = 20190101;
private int stopdateb = 20191231;
private int startdatec = 20190101;
private int stopdatec = 20191231;
// User defined variables (add any user defined variables below)
#endregion
/// <summary>
/// This method is used to configure the strategy and is called once before any strategy method is called.
/// </summary>
protected override void Initialize()
{


Add(CurrentDayOHL());

SetProfitTarget("", CalculationMode.Ticks, Tickprofit);
SetStopLoss("", CalculationMode.Ticks, Tickstoploss, true);
SetTrailStop("", CalculationMode.Ticks, Trailtick, true);
CalculateOnBarClose = true;
}
/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
if (ToDay(Time[0])>= startdate && ToDay(Time[0]) <= stopdate)
{
if ((ToTime(Time[0]) >= starttime && ToTime(Time[0]) <= stoptime))
{

// Condition set 1

if (Close[0] > Pricepivot)

{

DrawText("Buy!" + CurrentBar, "Buy!", 0, -2, Color.ForestGreen);
EnterLong(Quantity, "");
}

// Condition set 2

if (Close[0] < Pricepivot)

{

DrawText("Sell!" + CurrentBar, "Sell!", 0, 2, Color.DeepPink);
EnterShort(Quantity, "");
}


}
}



if (ToDay(Time[0])>= startdateb && ToDay(Time[0]) <= stopdateb)
{
if ((ToTime(Time[0]) >= starttimeb && ToTime(Time[0]) <= stoptimeb))
{

// Condition set 3

if (Close[0] > Pricepivotb)

{

DrawText("Buy!" + CurrentBar, "Buy!", 0, -2, Color.ForestGreen);
EnterLong(Quantity, "");
}

// Condition set 4

if (Close[0] < Pricepivotb)

{

DrawText("Sell!" + CurrentBar, "Sell!", 0, 2, Color.DeepPink);
EnterShort(Quantity, "");
}


}
}
if (ToDay(Time[0])>= startdatec && ToDay(Time[0]) <= stopdatec)
{
if ((ToTime(Time[0]) >= starttimec && ToTime(Time[0]) <= stoptimec))
{

// Condition set 5

if (Close[0] > Pricepivotc)

{

DrawText("Buy!" + CurrentBar, "Buy!", 0, -2, Color.ForestGreen);
EnterLong(Quantity, "");
}

// Condition set 6

if (Close[0] < Pricepivotc)

{

DrawText("Sell!" + CurrentBar, "Sell!", 0, 2, Color.DeepPink);
EnterShort(Quantity, "");
}


}
}
}



#region Properties

[Description("pivot")]
[GridCategory("Parameters")]
public double Pricepivot
{
get { return pricepivot; }
set { pricepivot = Math.Max(1, value); }
}

[Description("pivot")]
[GridCategory("Parameters")]
public double Pricepivotb
{
get { return pricepivotb; }
set { pricepivotb = Math.Max(1, value); }
}
[Description("pivot")]
[GridCategory("Parameters")]
public double Pricepivotc
{
get { return pricepivotc; }
set { pricepivotc = Math.Max(1, value); }
}

[Description("tick profit")]
[GridCategory("Parameters")]
public int Tickprofit
{
get { return tickprofit; }
set { tickprofit = Math.Max(1, value); }
}
[Description("quantity")]
[GridCategory("Parameters")]
public int Quantity
{
get { return quantity; }
set { quantity = Math.Max(1, value); }
}
[Description("tick stoploss")]
[GridCategory("Parameters")]
public int Tickstoploss
{
get { return tickstoploss; }
set { tickstoploss = Math.Max(1, value); }
}
[Description("trail tick stop")]
[GridCategory("Parameters")]
public int Trailtick
{
get { return trailtick; }
set { trailtick = Math.Max(1, value); }
}


[Description("")]
[GridCategory("Parameters")]

public int Startdate
{
get { return startdate; }
set { startdate = Math.Max(1, value); }
}

[Description("")]
[GridCategory("Parameters")]

public int Stoptdate
{
get { return stopdate; }
set { stopdate = Math.Max(1, value); }
}

[Description("")]
[GridCategory("Parameters")]

public int Startdateb
{
get { return startdateb; }
set { startdateb = Math.Max(1, value); }
}

[Description("")]
[GridCategory("Parameters")]

public int Stoptdateb
{
get { return stopdateb; }
set { stopdateb = Math.Max(1, value); }
}
[Description("")]
[GridCategory("Parameters")]

public int Startdatec
{
get { return startdatec; }
set { startdatec = Math.Max(1, value); }
}

[Description("")]
[GridCategory("Parameters")]

public int Stoptdatec
{
get { return stopdatec; }
set { stopdatec = Math.Max(1, value); }
}


[Description("")]
[GridCategory("Parameters")]
public int Starttime
{
get { return starttime;}
set { starttime = Math.Max(1, value); }
}

[Description("")]
[GridCategory("Parameters")]
public int Stoptime
{
get { return stoptime; }
set { stoptime = Math.Max(1, value); }
}
[Description("")]
[GridCategory("Parameters")]
public int Starttimeb
{
get { return starttimeb;}
set { starttimeb = Math.Max(1, value); }
}

[Description("")]
[GridCategory("Parameters")]
public int Stoptimeb
{
get { return stoptimeb; }
set { stoptimeb = Math.Max(1, value); }
}
[Description("")]
[GridCategory("Parameters")]
public int Starttimec
{
get { return starttimec;}
set { starttimec = Math.Max(1, value); }
}

[Description("")]
[GridCategory("Parameters")]
public int Stoptimec
{
get { return stoptimec; }
set { stoptimec = Math.Max(1, value); }
}
#endregion

}
}
 
#region Using declarations
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Xml.Serialization;
using NinjaTrader.Cbi;
using NinjaTrader.Data;
using NinjaTrader.Indicator;
using NinjaTrader.Gui.Chart;
using NinjaTrader.Strategy;
#endregion
// This namespace holds all strategies and is required. Do not change it.
namespace NinjaTrader.Strategy
{
/// <summary>
/// Trades like a mean reversion algo around pivot
/// </summary>
[Description("Trades based on time intervals using pivots")]
public class InvLineInSand : Strategy
{
#region Variables
// Wizard generated variables
private double pricepivot = 3092.25; // Default setting for Pricepivot
private double pricepivotb = 3092.25;
private double pricepivotc = 3092.25;
private int tickprofit = 160; // Default setting for Tickprofit
private int tickstoploss = 16; // Default setting for Tickstoploss
private int trailtick = 40; // Default setting for Trailtick
private int quantity = 1;
private int starttime = 180000;
private int stoptime = 240000;
private int starttimeb = 1;
private int stoptimeb = 100000;
private int starttimec = 100100;
private int stoptimec = 160000;
private int startdate = 20190101;
private int stopdate = 20191231;
private int startdateb = 20190101;
private int stopdateb = 20191231;
private int startdatec = 20190101;
private int stopdatec = 20191231;
// User defined variables (add any user defined variables below)
#endregion
/// <summary>
/// This method is used to configure the strategy and is called once before any strategy method is called.
/// </summary>
protected override void Initialize()
{


Add(CurrentDayOHL());

SetProfitTarget("", CalculationMode.Ticks, Tickprofit);
SetStopLoss("", CalculationMode.Ticks, Tickstoploss, true);
SetTrailStop("", CalculationMode.Ticks, Trailtick, true);
CalculateOnBarClose = true;
}
/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
if (ToDay(Time[0])>= startdate && ToDay(Time[0]) <= stopdate)
{
if ((ToTime(Time[0]) >= starttime && ToTime(Time[0]) <= stoptime))
{

// Condition set 1

if (Close[0] > Pricepivot)

{

DrawText("Sell!" + CurrentBar, "Sell!", 0, -2, Color.ForestGreen);
EnterShort(Quantity, "");
}

// Condition set 2

if (Close[0] < Pricepivot)

{

DrawText("Buy!" + CurrentBar, "Buy!", 0, 2, Color.DeepPink);
EnterLong(Quantity, "");
}


}
}



if (ToDay(Time[0])>= startdateb && ToDay(Time[0]) <= stopdateb)
{
if ((ToTime(Time[0]) >= starttimeb && ToTime(Time[0]) <= stoptimeb))
{

// Condition set 3

if (Close[0] > Pricepivotb)

{

DrawText("Sell!" + CurrentBar, "Sell!", 0, -2, Color.ForestGreen);
EnterShort(Quantity, "");
}

// Condition set 4

if (Close[0] < Pricepivotb)

{

DrawText("Buy!" + CurrentBar, "Buy!", 0, 2, Color.DeepPink);
EnterLong(Quantity, "");
}


}
}
if (ToDay(Time[0])>= startdatec && ToDay(Time[0]) <= stopdatec)
{
if ((ToTime(Time[0]) >= starttimec && ToTime(Time[0]) <= stoptimec))
{

// Condition set 5

if (Close[0] > Pricepivotc)

{

DrawText("Sell!" + CurrentBar, "Sell!", 0, -2, Color.ForestGreen);
EnterShort(Quantity, "");
}

// Condition set 6

if (Close[0] < Pricepivotc)

{

DrawText("Buy!" + CurrentBar, "Buy!", 0, 2, Color.DeepPink);
EnterLong(Quantity, "");
}


}
}
}



#region Properties

[Description("pivot")]
[GridCategory("Parameters")]
public double Pricepivot
{
get { return pricepivot; }
set { pricepivot = Math.Max(1, value); }
}

[Description("pivot")]
[GridCategory("Parameters")]
public double Pricepivotb
{
get { return pricepivotb; }
set { pricepivotb = Math.Max(1, value); }
}
[Description("pivot")]
[GridCategory("Parameters")]
public double Pricepivotc
{
get { return pricepivotc; }
set { pricepivotc = Math.Max(1, value); }
}

[Description("tick profit")]
[GridCategory("Parameters")]
public int Tickprofit
{
get { return tickprofit; }
set { tickprofit = Math.Max(1, value); }
}
[Description("quantity")]
[GridCategory("Parameters")]
public int Quantity
{
get { return quantity; }
set { quantity = Math.Max(1, value); }
}
[Description("tick stoploss")]
[GridCategory("Parameters")]
public int Tickstoploss
{
get { return tickstoploss; }
set { tickstoploss = Math.Max(1, value); }
}
[Description("trail tick stop")]
[GridCategory("Parameters")]
public int Trailtick
{
get { return trailtick; }
set { trailtick = Math.Max(1, value); }
}


[Description("")]
[GridCategory("Parameters")]

public int Startdate
{
get { return startdate; }
set { startdate = Math.Max(1, value); }
}

[Description("")]
[GridCategory("Parameters")]

public int Stoptdate
{
get { return stopdate; }
set { stopdate = Math.Max(1, value); }
}

[Description("")]
[GridCategory("Parameters")]

public int Startdateb
{
get { return startdateb; }
set { startdateb = Math.Max(1, value); }
}

[Description("")]
[GridCategory("Parameters")]

public int Stoptdateb
{
get { return stopdateb; }
set { stopdateb = Math.Max(1, value); }
}
[Description("")]
[GridCategory("Parameters")]

public int Startdatec
{
get { return startdatec; }
set { startdatec = Math.Max(1, value); }
}

[Description("")]
[GridCategory("Parameters")]

public int Stoptdatec
{
get { return stopdatec; }
set { stopdatec = Math.Max(1, value); }
}


[Description("")]
[GridCategory("Parameters")]
public int Starttime
{
get { return starttime;}
set { starttime = Math.Max(1, value); }
}

[Description("")]
[GridCategory("Parameters")]
public int Stoptime
{
get { return stoptime; }
set { stoptime = Math.Max(1, value); }
}
[Description("")]
[GridCategory("Parameters")]
public int Starttimeb
{
get { return starttimeb;}
set { starttimeb = Math.Max(1, value); }
}

[Description("")]
[GridCategory("Parameters")]
public int Stoptimeb
{
get { return stoptimeb; }
set { stoptimeb = Math.Max(1, value); }
}
[Description("")]
[GridCategory("Parameters")]
public int Starttimec
{
get { return starttimec;}
set { starttimec = Math.Max(1, value); }
}

[Description("")]
[GridCategory("Parameters")]
public int Stoptimec
{
get { return stoptimec; }
set { stoptimec = Math.Max(1, value); }
}
#endregion

}
}
 
Above code is only as good as its inputs. It is meant for the E mini SP 500. Only someone with extensive screen time and chart review can decipher what the inputs should be at any given time.
 
Top