Conditions: VOL()[1] <= (VOLMA(20)[0])*(1-0.7)
Actions: DrawArrowUp("My up arrow" + CurrentBar, false,0, Low[0]+-6 * TickSize, Color.Black)
The code comes up as follows:
// 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")]
publicclass VolumBreakout : 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>
protectedoverridevoid Initialize()
{
Add(VOL());
Add(VOLMA(20));
CalculateOnBarClose = true;
}
///<summary>
/// Called on each bar update event (incoming tick)
///</summary>
protectedoverridevoid OnBarUpdate()
{
// Condition set 1
if (VOL()[1] <= (VOLMA(20)[0]) * (1 + -70))
{
DrawArrowUp("My up arrow" + CurrentBar, false, 0, Low[0] + -6 * TickSize, Color.Black);
}
}
#region Properties
#endregion
}
}
Thanks for the help.
Comment