![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| Indicator Development Support for the development of custom indicators using NinjaScript. |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Mar 2010
Posts: 7
Thanks: 0
Thanked 0 times in 0 posts
|
Hello,
I want to make an indicator but there is a big problem; the idea is that when a situation occur, like a line cross above another, a variable, well let's call it flag, equals 1. When an another situation occurs, the flag = -1. The problem is that i've got to declare this variable, typically int flag = 0; and when a situation on a bar a situation occurs, flag = 1 or -1, but the next bar, it equals 0 (due to the declaration). I want that the value of flag remains until a new situation or event. Is that possible? I knew that is possible in Strategy with user variable but in an indicator? Thank U a lot!!! (Sorry for my english!! )
|
|
|
|
| Thread Tools | |
| Display Modes | |
|
|