Drawing Fib Levels in Stratergy - futures io
futures io



Drawing Fib Levels in Stratergy


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Futuresatm with 2 posts (0 thanks)
    2. looks_two okinawayutaka with 1 posts (0 thanks)
    3. looks_3 trendisyourfriend with 1 posts (0 thanks)
    4. looks_4 sabankaradeniz with 1 posts (0 thanks)
    1. trending_up 1,473 views
    2. thumb_up 0 thanks given
    3. group 4 followers
    1. forum 5 posts
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

Drawing Fib Levels in Stratergy

(login for full post details)
  #1 (permalink)
 Futuresatm 
Elkridge
 
Experience: Advanced
Platform: Ninjatrader, TOS
Trading: Futures, Options
 
Posts: 5 since Apr 2020
Thanks: 1 given, 0 received

Can someone please post an example of drawing fib levels using stratergy in Ninjatrader 8? Can i use these fib levels and taking a postion at 50% retracement? Appreciate your help..

Started this thread Reply With Quote

Journal Challenge April 2021 results (now extended!):
Competing for $1800 in prizes from Jigsaw
looks_oneMaking a Living with the Microsby sstheo
(76 thanks from 10 posts)
looks_twoSalao's Journalby Salao
(23 thanks from 5 posts)
looks_3Deetee’s DAX Trading Journal (time based)by Deetee
(15 thanks from 8 posts)
looks_4Learning to Profit - A journey in algorithms and optionsby Syntax
(12 thanks from 7 posts)
looks_5Becoming a day trader (PA, volume profile, footprint etc.)by JirkaF
(0 thanks from 2 posts)
 
Best Threads (Most Thanked)
in the last 7 days on futures io
The Crude Dude Oil Trading System
73 thanks
futures io site changelog and issues/problem reporting
71 thanks
Would You Sell Your System?
65 thanks
FIO Journal Challenge - April 2021 w/Jigsaw Trading
30 thanks
Big Mike in Ecuador
25 thanks
 
(login for full post details)
  #2 (permalink)
 okinawayutaka 
Tucson
 
Experience: None
 
Posts: 50 since Sep 2019
Thanks: 1 given, 38 received

look up david H at https://www.eminiaddict.com/ he has a 7 trial membership.. free.. he haS a whole system off the fibs

Reply With Quote
 
(login for full post details)
  #3 (permalink)
 trendisyourfriend 
Market Wizard
Quebec
 
Experience: Intermediate
Platform: NinjaTrader wt Rancho Dinero's profiling tools
Broker: AMP/CQG
Trading: ES, NQ, YM
 
trendisyourfriend's Avatar
 
Posts: 3,994 since Oct 2009
Thanks: 3,671 given, 5,159 received



Futuresatm View Post
Can someone please post an example of drawing fib levels using stratergy in Ninjatrader 8? Can i use these fib levels and taking a postion at 50% retracement? Appreciate your help..

If you mean can a strategy be made in order to automatically enter a trade at 50% retracement of a swing? then the answer is Yes it can.

For this, you'd need an indicator capable to identify a swing and that can plot a retracement target level for a pullback entry and maybe plot a target profit level based on an extention percentage calculated from the length of the swing.

Reply With Quote
 
(login for full post details)
  #4 (permalink)
sabankaradeniz
Turkey
 
 
Posts: 7 since Feb 2020
Thanks: 0 given, 0 received

As I understand you want an example of a strategy that will work on every 50% withdrawal of fibo?

Reply With Quote
 
(login for full post details)
  #5 (permalink)
 Futuresatm 
Elkridge
 
Experience: Advanced
Platform: Ninjatrader, TOS
Trading: Futures, Options
 
Posts: 5 since Apr 2020
Thanks: 1 given, 0 received


sabankaradeniz View Post
As I understand you want an example of a strategy that will work on every 50% withdrawal of fibo?

Trying to understand how to apply fib levels in a stratergy, If i use donchian channel to identify high and lows, looking for a sample code to draw a fib levels from high to low

Started this thread Reply With Quote
 
(login for full post details)
  #6 (permalink)
 darkmarine 
NEW BRUNSWICK
 
Experience: Intermediate
Platform: ninjatrader
Trading: nq
 
Posts: 11 since Jun 2020
Thanks: 2 given, 0 received

look below

#region Using declarations
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Xml.Serialization;
using System.Collections.Generic;
using System.Windows.Forms;
using NinjaTrader.Cbi;
using NinjaTrader.Data;
using NinjaTrader.Indicator;
using NinjaTrader.Gui.Chart;
using NinjaTrader.Strategy;
#endregion

///
/// Coded by traderpards at the direction here:
/// https://futures.io/elite-circle/32758-want-your-ninjatrader-strategy-created-free-4.html#post435134
///
/// Hmmm... I seem to have forgotten to keep track of the update history.
///
/// 11-11-2014 - Added limit orders (and I have no idea if they'll work in live trading but they seem
/// to work with historical data.)
///
///

// This namespace holds all strategies and is required. Do not change it.
namespace NinjaTrader.Strategy
{
/// <summary>
/// This strategy detects when a certain Fibonacci level has been reached and then enters a trade. It exits a trade when the instrument either reaches a predetermined level or is stopped out.
/// </summary>
[Description("This strategy detects when a certain Fibonacci level has been reached and then enters a trade. It exits a trade when the instrument either reaches a predetermined level or is stopped out.")]
public class FibonacciTradeEntry : Strategy
{
#region Variables
private int iGapLower = 10;
private int iGapUpper = 50;
private int iQty = 1;
private TradeLevels entryTradeLevel = TradeLevels.p161_8;
private TradeLevels stopTradeLevel = TradeLevels.p261_8;
private TradeLevels profitTargetTradeLevel = TradeLevels.p50;
private int _161_bar = 0;
private bool b_161_barSet = false;
private int firstBar = 0;
private int tickSlop = 0;
private Color fibColor = Color.Black;

private bool bMoveStop = false;
private TradeLevels priceHitTradeLevel = TradeLevels.p100;
private TradeLevels moveStopTradeLevel = TradeLevels.p150;

private double dSessionOpen = 0.00;
private double dPrevSessionClose = 0.00;

private int numbBarsLastEmail = 0;
private bool bSendEmail = true;
private int startTime = 080000; // Start trading time
private int endTime = 110000; // End trading time
private int warnTime = 210000; // Warn time if in a live trade
private string emailTo = string.Empty;
private string emailFrom = string.Empty;

public enum TradeLevels { p23_6, p38_2, p50, p61_8, p76_4, p100, p150, p161_8, p261_8, zero, n23_6, n38_2, n50, n61_8, n76_4, n100, n150, n161_8, n261_8 }
public enum TradeDir { NO_TRADE, LONG, SHORT }
private TradeDir tradeDir = TradeDir.NO_TRADE;

Dictionary<string, double> levels;
Dictionary<TradeLevels, string> tradeLevelStrings;

private System.Windows.Forms.ToolStrip strip = null;
private System.Windows.Forms.ToolStripButton btnEmail = null;
private System.Windows.Forms.ToolStripSeparator sepL = null;
private System.Windows.Forms.ToolStripSeparator sepR = null;

private Font boldFont = new Font("Arial", 8,FontStyle.Bold);
private bool buttonsloaded = false;
#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()
{
CalculateOnBarClose = true;

levels = new Dictionary<string, double>();
tradeLevelStrings = new Dictionary<TradeLevels, string>();

}

#region OnStartup
protected override void OnStartUp()
{
tradeLevelStrings[TradeLevels.p23_6] = "23.6";
tradeLevelStrings[TradeLevels.p38_2] = "38.2";
tradeLevelStrings[TradeLevels.p50] = "50";
tradeLevelStrings[TradeLevels.p61_8] = "61.8";
tradeLevelStrings[TradeLevels.p76_4] = "76.4";
tradeLevelStrings[TradeLevels.p100] = "100";
tradeLevelStrings[TradeLevels.p150] = "150";
tradeLevelStrings[TradeLevels.p161_8] = "161.8";
tradeLevelStrings[TradeLevels.p261_8] = "261.8";
tradeLevelStrings[TradeLevels.zero] = "0";
tradeLevelStrings[TradeLevels.n23_6] = "-23.6";
tradeLevelStrings[TradeLevels.n38_2] = "-38.2";
tradeLevelStrings[TradeLevels.n50] = "-50";
tradeLevelStrings[TradeLevels.n61_8] = "-61.8";
tradeLevelStrings[TradeLevels.n76_4] = "-76.4";
tradeLevelStrings[TradeLevels.n100] = "-100";
tradeLevelStrings[TradeLevels.n150] = "-150";
tradeLevelStrings[TradeLevels.n161_8] = "-161.8";
tradeLevelStrings[TradeLevels.n261_8] = "-261.8";

// Add a button to the toolstrip
if( ChartControl != null )
{
System.Windows.Forms.Control[] controls = ChartControl.Controls.Find("tsrTool", false);
if( controls.Length > 0 )
{
strip = (System.Windows.Forms.ToolStrip)controls[0];

sepL = new ToolStripSeparator();
strip.Items.Add(sepL);

btnEmail = new System.Windows.Forms.ToolStripButton("btnEmail");
btnEmail.Font = boldFont ;
btnEmail.ForeColor = Color.White;
btnEmail.BackColor = Color.Green;
btnEmail.Text = "Allow email";
btnEmail.ToolTipText = "Toggle to turn sending email on/off.";

strip.Items.Add(btnEmail);
btnEmail.Click += btnEmail_Click; // Event handler to do the toggling

sepR = new ToolStripSeparator();
strip.Items.Add(sepR);

buttonsloaded = true;
}
}
}
#endregion

#region Event handlers
private void btnEmail_Click( object sender, EventArgs e )
{
if( btnEmail.Text == "Allow email" )
{
// Going to suspending trading
bSendEmail = false; // Do not send email
btnEmail.Text = "Suspend email";
btnEmail.Font = boldFont;
btnEmail.ForeColor = Color.White;
btnEmail.BackColor = Color.DarkRed;
}
else if( btnEmail.Text == "Suspend email")
{
// Going to allowing for sending of email
bSendEmail = true; // Allow sending of email
btnEmail.Text = "Allow email";
btnEmail.Font = boldFont ;
btnEmail.ForeColor = Color.White;
btnEmail.BackColor = Color.Green;
}
}
#endregion

#region OnBarUpdate
/// <summary>
/// Called on each bar update event (incoming tick)
/// Algorithm:
/// 1. Determine whether or not we have a bearish gap, a bullish gap or no gap and whether or not the gap is
/// within a user-defined range for trading. If it is:
/// 2. Buy at the 161.8 level
/// 3. Place a stop at the 261.8 level
/// 4. Place a profit target at the 60 level
///
/// Note: The user would also like some kind of ATM trailing stop option coded but I don't understand any
/// of that so until I do, this strategy will not attempt that.
/// </summary>
protected override void OnBarUpdate()
{
if( Bars.FirstBarOfSession )
{
dSessionOpen = Open[0];
dPrevSessionClose = BarsArray[0].GetDayBar(1).Close;
setFibLevels();
plotFibLevels();

firstBar = CurrentBar;
b_161_barSet = false;

// 1. Measure the gap
double gap = Math.Abs( dPrevSessionClose - dSessionOpen )/TickSize;
if( gap >= GapLower
&& gap <= GapUpper )
{
// We're eligible for a trade, but which type?
if( dPrevSessionClose < dSessionOpen ) {
tradeDir = TradeDir.SHORT;
}
else if( dPrevSessionClose > dSessionOpen ) {
tradeDir = TradeDir.LONG;
}
else {
tradeDir = TradeDir.NO_TRADE;
}
}
else {
tradeDir = TradeDir.NO_TRADE; // We won't be taking a trade at all today
}
}

if( tradeDir == TradeDir.NO_TRADE ) {
return;
}

// If we've filled the gap, then no trade
if( (tradeDir == TradeDir.LONG && Close[0] >= dPrevSessionClose)
|| (tradeDir == TradeDir.SHORT && Close[0] <= dPrevSessionClose) )
{
tradeDir = TradeDir.NO_TRADE;
return;
}

// Check the time (** see criteria below)
if( !( ToTime(Time[0]) > StartTime
&& ToTime(Time[0]) < EndTime) )
{
return;
}

// New algorithm:
// 1. If trade hits the 161, then set "open to trade"
// a. We will cancel and mark NO_TRADE if price hits 261
// 2. If price trades over 161 and trades down below 161 on a subsequent bar, then then enter a short trade
// a. Opposite for longs.

if( !b_161_barSet
&& ( (tradeDir == TradeDir.SHORT && High[0] >= levels[tradeLevelStrings[EntryTradeLevel]])
|| (tradeDir == TradeDir.LONG && Low[0] <= levels[tradeLevelStrings[EntryTradeLevel]]) ) )
{
_161_bar = CurrentBar;
b_161_barSet = true;
}
if( (tradeDir == TradeDir.SHORT && High[0] >= levels[tradeLevelStrings[StopTradeLevel]])
|| (tradeDir == TradeDir.LONG && Low[0] <= levels[tradeLevelStrings[StopTradeLevel]]) )
{
tradeDir = TradeDir.NO_TRADE;
return;
}

if( b_161_barSet == true
&& _161_bar != CurrentBar )
{
if( tradeDir == TradeDir.SHORT
&& GetCurrentAsk() <= levels[tradeLevelStrings[EntryTradeLevel]] )
{
doShort();
}
else if( tradeDir == TradeDir.LONG
&& GetCurrentBid() >= levels[tradeLevelStrings[EntryTradeLevel]] )
{
doLong();
}
}

/*********************** Old algorithm
// If tradeDir <> NO_TRADE, then we are eligible to take a trade, if we've gotten this far.
// 1. Price has to hit the 161.8 level
if( tradeDir == TradeDir.SHORT
&& GetCurrentBid() >= levels[tradeLevelStrings[EntryTradeLevel]] )
{
doShort();
}
if( tradeDir == TradeDir.LONG
&& GetCurrentAsk() <= levels[tradeLevelStrings[EntryTradeLevel]] )
{
doLong();
}
*************************/

// More to do:
// once the ENTRY ORDER is executed should be placed other conditions to keep the trade open, apart
// from the stoploss and take proffit orders:
// * if price reaches 100% (Fibonacci level, where 0%= G1 and 100%=G2) and goes back to 150%
// (Fibonacci level, where 0%= G1 and 100%=G2) then CLOSE the trade At 150% and cancel All orders.
// In other words, when the price gets to the 100% level, just move the stop to the 150 level.
if( MoveStop )
{
if( tradeDir == TradeDir.SHORT
&& Close[0] <= levels[tradeLevelStrings[PriceHitTradeLevel]] )
{
SetStopLoss( CalculationMode.Price, levels[tradeLevelStrings[MoveStopTradeLevel]] );
}
else if( tradeDir == TradeDir.LONG
&& Close[0] >= levels[tradeLevelStrings[PriceHitTradeLevel]] )
{
SetStopLoss( CalculationMode.Price, levels[tradeLevelStrings[MoveStopTradeLevel]] );
}
}

// ** if trade has not entered at 11:30am then CANCELL ORDER.
// In other words, if the time is passed the user set time, then return like we did above.

// *** if trade is entered (ongoing) and it is one hour before closing the market (for example with
// FDAX 22:00 would be 21:00) then send an email alert whit chart and text "TRADE STILL OPEN"
// Easier to just let the user enter that time...
if( Position.MarketPosition != MarketPosition.Flat
&& ToTime(Time[0]) >= LiveTradeWarnTime )
{
if( bSendEmail
&& (CurrentBar - numbBarsLastEmail) > 2)
{
string text = "There is an open trade after the warn period.";
SendMail( EmailFrom, EmailTo, "Trade warning", text );
numbBarsLastEmail = CurrentBar;
}
}

}
#endregion

#region OnExecution
/// <summary>
/// Hmmm... We need to prevent successive losses, one right after the other if the market gaps down
/// and keeps on going. This override halts the carnage.
/// </summary>
/// <param name="exe"></param>
protected override void OnExecution( IExecution exe )
{
Trade lastTrade = null;
try
{
lastTrade = Performance.AllTrades[Performance.AllTrades.Count - 1];
if( lastTrade != null
&& lastTrade.ExitExecution == exe )
{
// Any trade, whether a winner or a loser should cause the strategy to not take any more trades.
// Only one trade allowed per day.
tradeDir = TradeDir.NO_TRADE;

// Send an email
if( bSendEmail
&& (CurrentBar - numbBarsLastEmail) > 2 )
{
string text = "Trade for today has closed.";
SendMail( EmailFrom, EmailTo, "Trade exit", text );
numbBarsLastEmail = CurrentBar;
}
}
}
catch {}
}
#endregion

#region OnTermination()
/// <summary>
/// Overridden in order to remove the toolbar stuff so the controls don't repaint on refresh
/// </summary>
protected override void OnTermination()
{
if( buttonsloaded == true )
{
strip.Items.Remove(btnEmail);
strip.Items.Remove(sepL);
strip.Items.Remove(sepR);
buttonsloaded = false;
}
}
#endregion

public override string ToString()
{
string retVal = "FibonacciTradeEntry( GapLower = " + GapLower.ToString();
retVal += ", GapUpper = " + GapUpper.ToString();
retVal += ", Entry level = " + EntryTradeLevel.ToString();
retVal += ", Profit target = " + ProfitTradeLevel.ToString();
retVal += ", Stop level = " + StopTradeLevel.ToString();
retVal += ")";
return retVal;
}

#region Utility
private void setFibLevels()
{
levels.Clear();

// If close > open, then these levels are all negative, otherwise they're positive
double reference = dPrevSessionClose - dSessionOpen;
levels.Add( "23.6", dPrevSessionClose - reference * 23.6/100 );
levels.Add( "38.2", dPrevSessionClose - reference * 38.2/100 );
levels.Add( "50", dPrevSessionClose - reference * 50/100 );
levels.Add( "61.8", dPrevSessionClose - reference * 61.8/100 );
levels.Add( "76.4", dPrevSessionClose - reference * 76.4/100 );
levels.Add( "100", dPrevSessionClose - reference * 100/100 );
levels.Add( "150", dPrevSessionClose - reference * 150/100 );
levels.Add( "161.8", dPrevSessionClose - reference * 161.8/100 );
levels.Add( "261.8", dPrevSessionClose - reference * 261.8/100 );
levels.Add( "0", dPrevSessionClose );
levels.Add( "-23.6", dPrevSessionClose + reference * 23.6/100 );
levels.Add( "-38.2", dPrevSessionClose + reference * 38.6/100 );
levels.Add( "-50", dPrevSessionClose + reference * 50/100 );
levels.Add( "-61.8", dPrevSessionClose + reference * 61.8/100 );
levels.Add( "-76.4", dPrevSessionClose + reference * 76.4/100 );
levels.Add( "-100", dPrevSessionClose + reference * 100/100 );
levels.Add( "-161.8", dPrevSessionClose + reference * 161.8/100 );
levels.Add( "-261.8", dPrevSessionClose + reference * 261.8/100 );
}

/// <summary>
/// We just want to draw a tiny line with a label on the chart so the user can know when to expect
/// a trade to occur.
/// </summary>
private void plotFibLevels()
{
int i = 0;
foreach (KeyValuePair<string, double> pair in levels)
{
DrawLine(pair.Key+CurrentBar, 3, pair.Value, 1, pair.Value, FibLevelColor );
DrawText( "txt"+(i++)+CurrentBar, pair.Key, 5, pair.Value, FibLevelColor );
}
}
#endregion

#region Trade helpers
private void doShort()
{
// EnterShort( Qty, "Short(" + Qty.ToString() + ")" );
EnterShortLimit( Qty, levels[tradeLevelStrings[EntryTradeLevel]]-TickSlop*TickSize, "Short(" + Qty.ToString() + ")");
SetStopLoss( CalculationMode.Price, levels[tradeLevelStrings[StopTradeLevel]] );
SetProfitTarget( CalculationMode.Price, levels[tradeLevelStrings[ProfitTradeLevel]] );

if( bSendEmail
&& (CurrentBar - numbBarsLastEmail) > 2 )
{
// Send an email
string text = "Trade has been initialized.";
SendMail( EmailFrom, EmailTo, "Trade entry", text );
numbBarsLastEmail = CurrentBar;
}
}
private void doLong()
{
// EnterLong( Qty, "Long(" + Qty.ToString() + ")" );
EnterLongLimit( Qty, levels[tradeLevelStrings[EntryTradeLevel]]+TickSlop*TickSize, "Long(" + Qty.ToString() + ")");
SetStopLoss( CalculationMode.Price, levels[tradeLevelStrings[StopTradeLevel]] );
SetProfitTarget( CalculationMode.Price, levels[tradeLevelStrings[ProfitTradeLevel]] );

if( bSendEmail
&& (CurrentBar - numbBarsLastEmail) > 2 )
{
// Send an email
string text = "Trade has been initialized.";
SendMail( EmailFrom, EmailTo, "Trade entry", text );
numbBarsLastEmail = CurrentBar;
}
}
#endregion

#region Properties
[Description("Lower boundary (in ticks) for the gap range to determine whether we will consider a trade")]
[GridCategory("Parameters")]
[Gui.Design.DisplayNameAttribute("\t\t\t\t\t\t\t\tGap - lower bound")]
public int GapLower
{
get { return iGapLower; }
set { iGapLower = Math.Max(1, value); }
}
[Description("Upper boundary (in ticks) for the gap range to determine whether we will consider a trade")]
[GridCategory("Parameters")]
[Gui.Design.DisplayNameAttribute("\t\t\t\t\t\t\tGap - upper bound")]
public int GapUpper
{
get { return iGapUpper; }
set { iGapUpper = Math.Max(1, value); }
}
[Description("Number of contracts to trade")]
[GridCategory("Parameters")]
[Gui.Design.DisplayNameAttribute("\t\t\t\t\t\tQuantity")]
public int Qty
{
get { return iQty; }
set { iQty = Math.Max(1, value); }
}
[Description("The Fibonacci level at which to enter")]
[GridCategory("Parameters")]
[Gui.Design.DisplayNameAttribute("\t\t\t\t\tEnter trade level")]
public TradeLevels EntryTradeLevel
{
get { return entryTradeLevel; }
set { entryTradeLevel = value; }
}
[Description("The Fibonacci level at which to place a stop loss")]
[GridCategory("Parameters")]
[Gui.Design.DisplayNameAttribute("\t\t\t\tStop loss trade level")]
public TradeLevels StopTradeLevel
{
get { return stopTradeLevel; }
set { stopTradeLevel = value; }
}
[Description("The Fibonacci level at which to place a profit target")]
[GridCategory("Parameters")]
[Gui.Design.DisplayNameAttribute("\t\t\tProfit target trade level")]
public TradeLevels ProfitTradeLevel
{
get { return profitTargetTradeLevel; }
set { profitTargetTradeLevel = value; }
}
[Description("True to move stop if certain level is hit.")]
[GridCategory("Parameters")]
[Gui.Design.DisplayNameAttribute("\t\tMove stop")]
public bool MoveStop
{
get { return bMoveStop; }
set { bMoveStop = value; }
}
[Description("If \"Move stop\" is true, the Fibonacci level that price needs to reach before we move the stop loss to a different level.")]
[GridCategory("Parameters")]
[Gui.Design.DisplayNameAttribute("\tPrice hit trade level")]
public TradeLevels PriceHitTradeLevel
{
get { return priceHitTradeLevel; }
set { priceHitTradeLevel = value; }
}
[Description("If \"Move stop\" is true, the Fibonacci level to which move the stop loss after a certain level is hit")]
[GridCategory("Parameters")]
[Gui.Design.DisplayNameAttribute("'Move stop to' trade level")]
public TradeLevels MoveStopTradeLevel
{
get { return moveStopTradeLevel; }
set { moveStopTradeLevel = value; }
}
[Description("Fib level color as it appears on the session open axis")]
[GridCategory("Parameters")]
[Gui.Design.DisplayName("Fib level color")]
public Color FibLevelColor
{
get { return fibColor; }
set { fibColor = value; }
}
[Description("The amount of \"slop\" to allow for a limit order to be placed a tick or two below the actual target entry.")]
[GridCategory("Parameters")]
[Gui.Design.DisplayName("Tick slop")]
public int TickSlop
{
get { return tickSlop; }
set { tickSlop = value; }
}
// Serialize Color object
[Browsable(false)]
public string FibColorSerialize
{
get { return NinjaTrader.Gui.Design.SerializableColor.ToString(fibColor); }
set { fibColor = NinjaTrader.Gui.Design.SerializableColor.FromString(value); }
}


#region Time settings
[Description("Start trading time. Format is HHMMSS and is on a 24 hour scale so 2:30 PM should be entered as 143000")]
[GridCategory("Time settings")]
[Gui.Design.DisplayName("\tTime1: Strategy begin time")]
public int StartTime
{
get { return startTime; }
set { startTime = Math.Max(000000, value); }
}
[Description("End trading time. Format is HHMMSS and is on a 24 hour scale so 2:30 PM should be entered as 143000")]
[GridCategory("Time settings")]
[Gui.Design.DisplayName("Time2: Strategy end time")]
public int EndTime
{
get { return endTime; }
set { endTime = Math.Max(000000, value); }
}
[Description("If we're still in a trade after this time, send an email warning. Format is HHMMSS and is on a 24 hour scale so 2:30 PM should be entered as 143000")]
[GridCategory("Time settings")]
[Gui.Design.DisplayName("Time3: Warn of live trade when:")]
public int LiveTradeWarnTime
{
get { return warnTime; }
set { warnTime = Math.Max(000000, value); }
}
#endregion TradeLevels

[Description("Email \"From\" address")]
[GridCategory("Email info")]
[Gui.Design.DisplayName("Email from")]
public string EmailFrom
{
get { return emailFrom; }
set { emailTo = value; }
}
[Description("Email \"To\" address")]
[GridCategory("Email info")]
[Gui.Design.DisplayName("Email to")]
public string EmailTo
{
get { return emailTo; }
set { emailTo = value; }
}


#endregion
}
}

Reply With Quote


futures io Trading Community Platforms and Indicators NinjaTrader > Drawing Fib Levels in Stratergy


Last Updated on August 16, 2020


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Journal Challenge w/$1,800 in prizes!

April
 

Seven Trading Mistakes Solved With Smart Trading Tools w/Brannigan Barrett

Elite only
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts