London
Experience: Intermediate
Platform: Ninjatrader, T4
Trading: Nasdaq
Posts: 5 since Feb 2013
Thanks Given: 1
Thanks Received: 0
|
Hi all
I am new to Ninjascript and trying to create a really basic script based around price action, but the script doesn't execute. The idea is simply to trigger a long trade on a hammer candlestick formation. Ideally, I would like to add a bullish engulfing/morning star to this on the same basis. This is what I have:
{
SetProfitTarget("", CalculationMode.Ticks, 42);
CalculateOnBarClose = true;
}
/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
// Condition set 1
if (Close[0] + 5 * TickSize > Low[0]
&& ToTime(Time[0]) >= ToTime(8, 0, 0)
&& ToTime(Time[0]) <= ToTime(17, 0, 0))
{
EnterLong(1, "");
}
}
thanks for any help
|