Thank you for your reply.
The snippet you have provided does not show any of your order entry logic, so I wouldn't be able to tell you what to change or not change. In the first link I shared, if you download the SampleIntrabarBacktest script, there are comments throughout the strategy that explain what is happening. For example, in State.Configure the 1 tick series is added as follows:
else if(State == State.Configure)
{
/* Add a secondary bar series.
Very Important: This secondary bar series needs to be smaller than the primary bar series.
Note: The primary bar series is whatever you choose for the strategy at startup. In this example I will
reference the primary as a 5min bars series. */
AddDataSeries(Data.BarsPeriodType.Tick, 1);
else if (State == State.Configure)
{
Calculate = Calculate.OnBarClose;
AddDataSeries("YM SEP23", Data.BarsPeriodType.Minute, 1, Data.MarketDataType.Last);
AddDataSeries("YM SEP23", Data.BarsPeriodType.Second, 15, Data.MarketDataType.Last);
AddDataSeries("YM SEP23", Data.BarsPeriodType.Tick, 1, Data.MarketDataType.Last);
AddDataSeries("YM SEP23", Data.BarsPeriodType.Volume, 1, Data.MarketDataType.Last);
}
EnterLong(int barsInProgressIndex, int quantity, string signalName)
Let's say you want to enter long on the 1 tick series, which is BarsInProgress 3, with a quantity of 5 and a signal name of myEnter. It would look like the following:
EnterLong(3, 5, "myEntry");
I am not able to answer your question "You thing that If I try my actual code on live trading, the orders should work nice?" This is subjective and up to you whether the orders are working nicely or not. I am not able to offer trading advice, and as far as the strategy running as expected without errors, you will need to test your strategy. I suggest testing your strategy in various ways, such as on the Playback Connection, running backtests in the Strategy Analyzer, and on live data using a simulated account. Once you are confident that your strategy is behaving as expected and submitting orders in the way you'd like it to in your tests, it is up to you whether you have the confidence to run it on a live account or not.
Please let us know if we may be of further assistance.

Comment