Reply

Problems with Ninjatrader source code

3 replies

alecas22

Subscriber, bbp_participant, community, 2 replies.

Visit profile

7 years ago #115680

Hi Support,

 

I’m testting a trial version of StrategyQuant, and I got this error when I tried to generate a source code of a couples of Strategies for NinjaTrader,

 

Error parsing included template NinjaTrader/Functions.inc
Error on line 42, column 90, in template NinjaTrader/Functions.inc
Found ensure_starts_with, expecting one of:  is_directive,  parent,  js_string,  j_string,  uncap_first,  is_transform,  number,  is_hash,  trim,  children,  has_content,  iso_ms,  xml,  iso_utc,  byte,  double,  left_pad,  json_string,  matches,  capitalize,  number_to_datetime,  contains,  size,  iso_local_h_nz,  iso_utc_ms,  iso_local_m_nz,  is_collection,  long,  default,  iso_utc_h_nz,  iso_local_ms,  is_boolean,  last_index_of,  c,  iso_utc_m_nz,  is_macro,  rtf,  iso_utc_nz,  upper_case,  node_name,  reverse,  cap_first,  url,  is_hash_ex,  iso_nz,  is_enumerable,  exists,  number_to_date,  first,  iso_local,  date,  iso,  replace,  float,  right_pad,  datetime,  node_type,  split,  iso_ms_nz,  number_to_time,  is_sequence,  iso_utc_m,  html,  ancestors,  iso_utc_h,  iso_local_ms_nz,  new,  last,  sort,  eval,  lower_case,  web_safe,  is_date,  is_string,  iso_local_nz,  word_list,  seq_last_index_of,  node_namespace,  string,  keys,  iso_m_nz,  values,  seq_index_of,  chunk,  sort_by,  iso_m,  starts_with,  substring,  index_of,  iso_h,  root,  floor,  iso_h_nz,  ceiling,  if_exists,  chop_linebreak,  iso_local_h,  length,  is_indexable,  groups,  is_node,  iso_local_m,  int,  iso_utc_ms_nz,  xhtml,  ends_with,  round,  interpret,  is_method,  namespace,  short,  seq_contains,  time,  is_number in NinjaTrader/Functions.inc
 
Could you please take a look at this?
 
Regards
Alejandro

 

 

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

7 years ago #139828

Hello Alejandro,

 

have you followed steps describer in user guide page 13 before compiling the strategy?

 

 

In order to make SQ strategies work with NinjaTrader, you have to import some NinjaTrader scripts into your NinjaTrader.

Open your NinjaTrader, go to File -> Utilities -> Import Ninja Script…
then find the file:
{StrategyQuant}/custom_indicators/SQ_NinjaTrader.zip and import it.
 
This will import all the additional indicators and base classes StrategyQuant uses, so your new strategies will run in NinjaTrader.

0

alecas22

Subscriber, bbp_participant, community, 2 replies.

Visit profile

7 years ago #139833

Hi Thomas,

 

I have made the post installation steps, where I imported scripts from SQ directory into Nijatrader product.

But I’m getting this problem on SQ source code panel, where SQ should display the strategy source code. Instead of the C# code, I’m getting that error.

 

According with the error description, the error is produced in the template that StrategyQuant use to generate the NinjaTrader code located in “c:\Strategyquant\code\NinjaTrader\Functions.inc

 

 

Regards

Alejandro

 

 

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

7 years ago #139913

Hello,

 

this to me seems like a corrupted template file. Could you try to re-install the StrategyQuant? It should solve the issue

Let me know

0

Viewing 3 replies - 1 through 3 (of 3 total)