Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Common variable between an indicator and a strategy?
Collapse
X
-
it started out because i was confused at the beginning by unexpected print message [my messages] popping up. i thought maybe for some reason messages were not displayed in the order they were created but rather grouped together by indicator or strategy or whatever. i was flying in the dark. the quick and dirty counter tracking counter would help me help me to understand how the flow actually goes. more generally, i have pursued this only because a 'global' variable can be useful and i got the impression early on in this thread that it could easily be done. I've learned a lot in this dialogue, but at greater time expense than i am comfortable with. i not in this to learn programming, but what is, is. i have rambled on, hope it came out in English.
-
Originally posted by joemiller View PostRe: "expose the variable as public in the indicator. This must be done using the Properties of the variable.
all I know is "public int tracectr;"
how does one alternatively do it using "properties"?
Comment
-
my strategy now has the two statements
public int GlobalVariable;
Add(lanceV3(1000));
I think I properly created the indicator as instructed per the preceding post
but now doing a 'LanceV3().GlobalVariable++;' in the strategy
results in error msg 'The name LanceV3 does not exist in the current context'
what am I doing wrong?
Comment
-
Originally posted by joemiller View Postmy strategy now has the two statements
public int GlobalVariable;
Add(lanceV3(1000));
I think I properly created the indicator as instructed per the preceding post
but now doing a 'LanceV3().GlobalVariable++;' in the strategy
results in error msg 'The name LanceV3 does not exist in the current context'
what am I doing wrong?
Other than that there is a paucity of information on what exactly you are doing. Yes, I have read your descriptions: I am saying that just a little snippet is often not enough to tell why an error exists.
Also, while I understand that you may have no desire to learn programming, if you are going to write NinjaScript, there is really no alternative. It is just not possible to teach programming using a few snippets of highly specific scenarios: one must needs understand concepts. At this time, it would appear that you may need to bite the bullet and learn the basic concepts first. The NinjaTrader Help file is a good resource, and so is Google.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by habeebft, Today, 07:27 AM
|
1 response
11 views
0 likes
|
Last Post Today, 08:08 AM | ||
Hi
by AveryFlynn
Started by AveryFlynn, Today, 04:57 AM
|
1 response
12 views
0 likes
|
Last Post Today, 07:57 AM | ||
Started by Max238, Today, 01:28 AM
|
4 responses
37 views
0 likes
|
Last Post
by Max238
Today, 07:49 AM
|
||
Started by r68cervera, Today, 05:29 AM
|
1 response
10 views
0 likes
|
Last Post Today, 07:47 AM | ||
Started by geddyisodin, Today, 05:20 AM
|
1 response
14 views
0 likes
|
Last Post Today, 07:38 AM |
Comment