Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
chart in backrest
Collapse
X
-
Hi Carl,
Not sure what else to check except making sure there are trades that occurred on the chart you're viewing.
If you can you send an email to [email protected] Attn:RyanM, I can check further your individual configuration.Last edited by NinjaTrader_RyanM1; 02-15-2010, 10:09 AM.Ryan M.NinjaTrader Customer Service
Comment
-
highs of multiple bars
Can I use the strategy wizard to say' " If the close of any bar after 1800 is greater than the high of any bar from 1630 to 1730", then .......
I only want it to take a trade the first time a bar meets this criteria; not several times. I've tried to set it up but I can't figure out how to include the highs of the multiple bars
Thanks, Carl
Comment
-
Hi Carl,
Yes, this reference sample below illustrates this concept:
Getting indicator values from a specified timeRyan M.NinjaTrader Customer Service
Comment
-
Thanks. I'll give it a try
Carl
I'm still having problems. I want to have the strategy say that if the close of any bar between 1730 and 1815 is higher than the highest high from 1630 to 1730 then.....
I tried to use Max(High,60)[1] as the input for the highest high of the bars from 1630 to 1730 but the wizard won't take it. I think I got the time part of it set right.
Please help
Thanks,
CarlLast edited by cpearce; 02-18-2010, 02:34 PM.
Comment
-
Carl
I'm still having problems. I want to have the strategy say that if the close of any bar between 1730 and 1815 is higher than the highest high from 1630 to 1730 then.....
I tried to use Max(High,60)[1] as the input for the highest high of the bars from 1630 to 1730 but the wizard won't take it. I think I got the time part of it set right.
Please help
Thanks,
Carl
Comment
-
Hi Carl,
This article might be more suited to what you're trying to do:
Calculating the highest high or lowest low for a specified time range.Ryan M.NinjaTrader Customer Service
Comment
-
I looked at the sites you suggested but I'm still lost. This is all pretty new to me so I don't understand a lot of the terminology. I can get the strategy to pick a trade at the correct time of day. I just can't get it to wait until a bar is higher than any of the bars between 1730 and 1810. In the condition builder, it always wants to use a "default input" but that doesn't work and I don't know what the value of the default input is or how to change it.
Any suggestions would be appreciated.
Carl
Comment
-
Hi Carl,
I can understand that's it's a challenging thing to learn. What you're trying to do can't be done with the condition builder only. It will require custom programming. You can try posting the code you have so far or maybe consider a 3rd party NinjaScript consultant to work on your project for a fee.
Ryan M.NinjaTrader Customer Service
Comment
-
Thanks, Ryan. Is there a course available that teaches NinjaScript and, if so, do you know the cost?
Here is what I have so far. I tried to create an input of "MAX(High, 60)[1]" to use so that the strategy will look back over the previous 60 bars (I'm using a 1 minute chart) but the wizard won't let me enter it. Can I unlock the code and enter this or whatever would would work.
I think the part with the "default input" is the problem.
Thanks again, Carl
#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>
/// Bar1800
/// </summary>
[Description("Bar1800")]
public class Bar1800 : 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()
{
SetProfitTarget("", CalculationMode.Ticks, 15);
SetStopLoss("", CalculationMode.Ticks, 3, false);
CalculateOnBarClose = false;
}
/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
// Condition set 1
if (ToTime(Time[0]) > ToTime(17, 30, 0)
&& ToTime(Time[0]) < ToTime(18, 10, 0)
&& Open[0] > HighestBar(DefaultInput, 1))
{
EnterLong(2, "");
}
}
#region Properties
#endregion
Comment
-
Hi Carl,
There isn't a course for NinjaScript I'm aware of. It's based on the C# programming language so having some C# knowledge definitely helps.
This article below discusses getting the highest high and lowest low values from a specified time.
That's one approach you can use to solve your issue. HighestBar will return the # of bars ago the highest price occurred and is probably not what you're looking for.Ryan M.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by kujista, Today, 06:23 AM
|
2 responses
6 views
0 likes
|
Last Post
by kujista
Today, 08:08 AM
|
||
Started by f.saeidi, Today, 08:03 AM
|
0 responses
4 views
0 likes
|
Last Post
by f.saeidi
Today, 08:03 AM
|
||
Started by cre8able, 04-17-2024, 04:16 PM
|
7 responses
64 views
0 likes
|
Last Post Today, 08:01 AM | ||
Started by Aviram Y, 08-09-2023, 09:04 AM
|
11 responses
299 views
0 likes
|
Last Post
by arjandezeeuw
Today, 08:00 AM
|
||
Started by Christopher Leggit, 02-15-2024, 09:00 AM
|
3 responses
47 views
0 likes
|
Last Post
by rdtdale
Today, 07:57 AM
|
Comment