Follow along with the video below to see how to install our site as a web app on your home screen.
Примечание: This feature currently requires accessing the site using the built-in Safari browser.
Скопируйте и опубликуйте код нормальным способом, чтоб его можно было скопировать и проверить, как это делается, вот в этом топике на форуме показано популярно и с видео .Я в програмировании ничего не смыслю, видимо поэтому и не вижу разницы. Скобки для меня одинаковые.
вот такой код, будем благодарны если поможете вбить период торговли 16.29 -23.59 по москвеСкопируйте и опубликуйте код нормальным способом, чтоб его можно было скопировать и проверить, как это делается, вот в этом топике на форуме показано популярно и с видео .
сори) это мой брат писал)Опять картинка. Вы неисправимы.
if (ToTime(Time[0])>162900 && ToTime(Time[0])<235500)
{
Весь код стратегии кладем сюда
}
Выше пост с ссылкой для кого писал?сори) это мой брат писал)
/// <summary>
/// This method is used to configure the strategy and is called once before any strategy method is called.
/// </summary>
protected override void Initialize()
{
SetStopLoss(900, true);
CalculateOnBarClose = true;
}
/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
// Condition set 1
if (Close[0] > Open[0])
{
EnterLong(DefaultQuantity, "");
}
// Condition set 2
if (Close[0] < Open[0])
{
EnterShort(DefaultQuantity, "");
}
}
// 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 MyCustomStrategy : Strategy
{
#region Variables
// Wizard generated variables
private int myInput0 = 1; // Default setting for MyInput0
// 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()
{
SetStopLoss(900, true);
CalculateOnBarClose = true;
}
/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{// Only trade between 16:29 and 23:59
if (ToTime(Time[0]) >= 162900 && ToTime(Time[0]) <= 235900)
// Condition set 1
if (Close[0] > Open[0])
{
EnterLong(DefaultQuantity, "");
}
// Condition set 2
if (Close[0] < Open[0])
{
EnterShort(DefaultQuantity, "");
}
}
#region Properties
[Description("")]
[GridCategory("Parameters")]
public int MyInput0
{
get { return myInput0; }
set { myInput0 = Math.Max(1, value); }
}
#endregion
}
}
Спасибо Вам. Вот вставил код и время.Верно?Выше пост с ссылкой для кого писал?
Просьба заключать код, в тег кода, привыкайте сразу с хорошему, дело в том, что при копировании с форума можно захватить обычное форматирование текста, что потом доставляет кучу проблем программистам, и также читабельность кода страдает, текст сливается , что раздражает.
ps/ Повторять не буду больше, введу жесткие правила в отношении этого, как на бывшем русскоязычном форуме Sierra Chart.
Да, спасибо за понимание.Спасибо Вам. Вот вставил код и время.Верно?
да вроде что то начало работать, но сделки проходят в другое время...будем думатьДа, спасибо за понимание.
Теперь удобно скопировать, распечатать и просто смотреть.
Да, ёклмн... что тут думать-то? Просто сравните то, что я написал и ваш код.но сделки проходят в другое время...будем думать
а если я наберусь наглости и попрошу Вас поправить код?) Это будет быстрее чем наши вопросы в чате) кстати тот алго что прописан дал за 6 дней января 7000 $ по es)Да, ёклмн... что тут думать-то? Просто сравните то, что я написал и ваш код.
После 10 лет опыта в разработке для трейдинга такое даже как юмор не воспринимается уже.кстати тот алго что прописан дал за 6 дней января 7000 $ по es)
Еще раз:
if (ToTime(Time[0])>162900 && ToTime(Time[0])<235500)
{
Весь код открытия сделок стратегии ОБЯЗАТЕЛЬНО кладем сюда (сравните с вашим кодом)
}
После 10 лет опыта в разработке для трейдинга такое даже как юмор не воспринимается уже.
// 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 MyCustomStrategy : Strategy
{
#region Variables
// Wizard generated variables
private int myInput0 = 1; // Default setting for MyInput0
// 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()
{
SetStopLoss(900, true);
CalculateOnBarClose = true;
}
/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{// Only trade between 16:29 PM and 23:45 PM
if (ToTime(Time[0]) >= 162900 && ToTime(Time[0]) <= 234500)
// Condition set 1
if (Close[0] > Open[0])
{
EnterLong(DefaultQuantity, "");
}
// Condition set 2
if (Close[0] < Open[0])
{
EnterShort(DefaultQuantity, "");
}
}
#region Properties
[Description("")]
[GridCategory("Parameters")]
public int MyInput0
{
get { return myInput0; }
set { myInput0 = Math.Max(1, value); }
}
#endregion
}
}