Compiling errors when changing code from NT7 to NT8 - futures io
futures io



Compiling errors when changing code from NT7 to NT8


Discussion in NinjaTrader

Updated
    1. trending_up 357 views
    2. thumb_up 0 thanks given
    3. group 1 followers
    1. forum 2 posts
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

Compiling errors when changing code from NT7 to NT8

(login for full post details)
  #1 (permalink)
gecko78
SINGAPORE
 
 
Posts: 1 since Aug 2018
Thanks: 0 given, 0 received

Hi All,

Kindly pardon my noob question as while i try to convert some NT7 to NT8 codes with my very limited knowledge.

I've the following code from NT7 which i try to convert to NT8 code but i get the following error "Cannot apply indexing with [] to an expression of type double". any kind soul can advise how i should really approach the problem? Thanks in advance.

NT7
if (base.Instrument.MasterInstrument.Compare(base.High[5], base.High[4]) == -1 && base.Instrument.MasterInstrument.Compare(base.High[4], base.High[3]) != -1)
{
LH = High[4];
LHCntr = 4;
if (!LDirToggle)
{
LH_Point.Set(4, LH);
for (int i = 0; i <= 4; i++)
{
LH_Line.Set(i, LH);
}
}
}

NT8
if (base.Instrument.MasterInstrument.Compare(base.High[5], base.High[4]) == -1 && base.Instrument.MasterInstrument.Compare(base.High[4], base.High[3]) != -1)
{
LH = base.High[4];
LHCntr = 4;
if (!LDirToggle)
{
LH_Point[0][4] = LH;
for (int i = 0; i <= 4; i++)
{
LH_Line[0][i] = LH;
}
}
}

Reply With Quote

Journal Challenge April 2021 results (now extended!):
Competing for $1800 in prizes from Jigsaw
looks_oneMaking a Living with the Microsby sstheo
(609 thanks from 61 posts)
looks_twoSalao's Journalby Salao
(155 thanks from 28 posts)
looks_3Learning to Profit - A journey in algorithms and optionsby Syntax
(115 thanks from 27 posts)
looks_4Deetee’s DAX Trading Journal (time based)by Deetee
(94 thanks from 30 posts)
looks_5Maybe a little bit different journalby Malykubo
(53 thanks from 32 posts)
 
Best Threads (Most Thanked)
in the last 7 days on futures io
I finally blew up an account
524 thanks
The Crude Dude Oil Trading System
77 thanks
Spoo-nalysis ES e-mini futures S&P 500
63 thanks
The tiyfTradePlanFactory indicator
25 thanks
Building a Crypto Mining Rig
18 thanks
 
(login for full post details)
  #3 (permalink)
 xplorer 
Site Moderator
London UK
 
Experience: Beginner
Platform: CQG
Broker: S5
Trading: Futures
 
xplorer's Avatar
 
Posts: 5,382 since Sep 2015
Thanks: 13,568 given, 13,073 received



gecko78 View Post
Hi All,

Kindly pardon my noob question as while i try to convert some NT7 to NT8 codes with my very limited knowledge.

I've the following code from NT7 which i try to convert to NT8 code but i get the following error "Cannot apply indexing with [] to an expression of type double". any kind soul can advise how i should really approach the problem? Thanks in advance.

NT7
if (base.Instrument.MasterInstrument.Compare(base.High[5], base.High[4]) == -1 && base.Instrument.MasterInstrument.Compare(base.High[4], base.High[3]) != -1)
{
LH = High[4];
LHCntr = 4;
if (!LDirToggle)
{
LH_Point.Set(4, LH);
for (int i = 0; i <= 4; i++)
{
LH_Line.Set(i, LH);
}
}
}

NT8
if (base.Instrument.MasterInstrument.Compare(base.High[5], base.High[4]) == -1 && base.Instrument.MasterInstrument.Compare(base.High[4], base.High[3]) != -1)
{
LH = base.High[4];
LHCntr = 4;
if (!LDirToggle)
{
LH_Point[0][4] = LH;
for (int i = 0; i <= 4; i++)
{
LH_Line[0][i] = LH;
}
}
}

At first glance (i.e. without reading the whole code and what it is trying to do), the error message seems to say that you somewhere have declared a variable of type double, i.e. a variable that can store non-integer values.

Then the code is seeing that you are trying to index that variable, i.e assign it a value that cannot be non-integer.


Does it make sense?

Reply With Quote


futures io Trading Community Platforms and Indicators NinjaTrader > Compiling errors when changing code from NT7 to NT8


Last Updated on February 25, 2019


Upcoming Webinars and Events

NinjaTrader Indicator Challenge!

Ongoing

Journal Challenge w/$1,800 in prizes!

May 7

The Cold Hard Truth: Maybe I Am Not Good Enough w/Chris Gray @ Earn2Trade

Elite only
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada), info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts