Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
My Questions
Collapse
X
-
System Backtest for Forex
Hi,
I have some Questions about trading with systems on the forex market.
I have a IB account and use the IB datafeed.
So I have the historical IB data for backtesting.
Are the IB data good for backtesting? Or should I choose others?
I heard that esignal is good?(good history and realtime feed)
If I trade the system live, so its better to take the realtime data from IB datafeed?Or an other vendor?
I think that its the best for my relatimetrading to take the IB feed, because
this prices are realy to trade. If I take an other it could be that the price witch is there is not to trade on my broker.
Comment
-
ProfitTrail
Can someone take a look at this schort script-the problem is I dont no why the profittrail not works?!
#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>
/// Enter the description of your strategy here
/// </summary>
[Description("Enter the description of your strategy here")]
public class Testtrail : Strategy
{
#region Variables
// Wizard generated variables
// 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()
{
CalculateOnBarClose = true;
SetTrailStop("L", CalculationMode.Ticks, 500, false);
SetStopLoss("L", CalculationMode.Ticks, 250, false);
}
/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
if (CurrentBar < 120)
{
return;
}
if(Position.MarketPosition == MarketPosition.Flat &&
CrossAbove(Momentum(100),0,1))
{
EnterLong("L");
SetTrailStop("L", CalculationMode.Ticks, 500, false);
SetStopLoss("L", CalculationMode.Ticks, 250, false);
}
/*if(Position.MarketPosition == MarketPosition.Long &&
BarsSinceEntry() == 100 )
{
ExitLong("L");
}*/
}
#region Properties
#endregion
}
}
Comment
-
I suggest debugging your strategy as per here to understand what's going on: http://www.ninjatrader-support.com/v...ead.php?t=3627
Also: Please post issues not related to the original post in a new thread.
Comment
-
Hugo1,
Just checking back to see if you have resolved the issues. Please also take note that you cannot use SetStopLoss() and SetTrailStop() concurrently. Check out the "Tips" section of this article: http://www.ninjatrader-support.com/H...TrailStop.htmlJosh P.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
606 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
353 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
105 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
560 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
561 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment