Děkuji za rychlou reakci a ještě poslední detail. Ukazka jednoduché strategie, kde je prikaz SendMail tak jak vypadne z ninjatraderu a tennahradím? (PosliEmail(string predmet,string text)), nebo jak má přesně ta syntaxe vypadat?
díky tom
#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
{
///
/// Enter the description of your strategy here
///
[Description("Enter the description of your strategy here")]
public class WMAzones : Strategy
{
#region Variables
// Wizard generated variables
private int myInput0 = 1; // Default setting for MyInput0
// User defined variables (add any user defined variables below)
#endregion
///
/// This method is used to configure the strategy and is called once before any strategy method is called.
///
protected override void Initialize()
{
CalculateOnBarClose = true;
}
///
/// Called on each bar update event (incoming tick)
///
protected override void OnBarUpdate()
{
// Condition set 1
if (CrossAbove(VMAZones(90, 20, 180).Lower, Close, 1))
{
DrawArrowDown("My down arrow" + CurrentBar, false, 0, Low[0] + 10 * TickSize, Color.Red);
SendMail("a", "s", "d", "f");
}
// Condition set 2
if (CrossBelow(VMAZones(90, 20, 180).Upper, Close, 1))
{
DrawArrowUp("My up arrow" + CurrentBar, false, 0, Close[0] + -10 * TickSize, Color.Lime);
SendMail("a", "s", "d", "f");
}
}
#region Properties
[Description("")]
[Category("Parameters")]
public int MyInput0
{
get { return myInput0; }
set { myInput0 = Math.Max(1, value); }
}
#endregion
}
}