You asked how to persist the chosen colors (impliedly changed from the PropertyGrid). You got the answer to the question that you asked.
Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
How do I determine if a bar closes at the top 25% of the bars range?
Collapse
X
-
Originally posted by Volcom View Post
You asked how to persist the chosen colors (impliedly changed from the PropertyGrid). You got the answer to the question that you asked.
-
koganam, I'm afraid you lost me. All I know is that every time I logged into NT, this indicator would not save the up and down colors. It kept defaulting to Red for down and blank for up, none in which I chose. It was a pain to constantly have to change this for multiple symbols daily. Not sure if I could have explained in any more detail. Thanks to Sandman, this is now fixed.
Comment
-
Originally posted by Volcom View Postkoganam, I'm afraid you lost me. All I know is that every time I logged into NT, this indicator would not save the up and down colors. It kept defaulting to Red for down and blank for up, none in which I chose. It was a pain to constantly have to change this for multiple symbols daily. Not sure if I could have explained in any more detail. Thanks to Sandman, this is now fixed.- How were you changing the colors before now?
- Can you still change the colors using that method? (i.e., without editing the file itself?
That is what we mean by hard-coding the colors.
Comment
-
1) I was changing the colors in the indicator itself and when that didn't work, I tried changing them in the code with the same result.
2) The only way I can change the colors now is through the code and not the indicator. That option has now been removed since I changed the coding from public to private which I am fine with since this seemed to be the only thing that worked.
Comment
-
Originally posted by Volcom View Post1) I was changing the colors in the indicator itself and when that didn't work, I tried changing them in the code with the same result.
2) The only way I can change the colors now is through the code and not the indicator. That option has now been removed since I changed the coding from public to private which I am fine with since this seemed to be the only thing that worked.
You have just repeated what I said. Your values are hard-coded and cannot be changed from the PropertyGrid.
Appropos of nothing, making the property private is meaningless and redundant, because the colors have already been declared as private in the backing store when they were first created (in the "Variables" section). But, no matter. There are always many ways to write code, so as long as you like your results, that is all that matters.
Comment
-
Originally posted by koganam View PostWell, then you were not lost after all?
You have just repeated what I said. Your values are hard-coded and cannot be changed from the PropertyGrid.
Appropos of nothing, making the property private is meaningless and redundant, because the colors have already been declared as private in the backing store when they were first created (in the "Variables" section). But, no matter. There are always many ways to write code, so as long as you like your results, that is all that matters.
Comment
-
volcom. Glad it worked out.
Your indicator colors the candlesticks in Panel1 but also opens a second panel. Don't know whether that is intentional on your part or not. Or if you fixed it already. If not, it's easy to fix. Go into your Code, under the section "Variables" and under the sub-section "protected override void Initialize()" add this line:
{
Overlay = true;
}
That will cause your indicator to then not open up in a second panel.
Currently your indicator defaults to calculate on BarClose=True. If you want to change that to False, add this line in the same section just underneath Overlay:
CalculateOnBarClose = false;
That will cause the candlestick bar to be colored while the bar is still in progress.
sandman
Comment
-
Originally posted by Darth_Trader View PostI hope it's what you are wanting.
All it does it color the bars that close at the X top of the range or X bottom of the range (adjustable).
And you can choose the color of the up and down bars.
Hope you like it.
- D
Comment
-
Candle % indicator
Hi Darth... hoping you're still on this forum. I've been looking for an indicator that will show the close of candel within the top or bttom 25% of a candle and came across your thread with the aaScalpBar.cs zip download. Sadly I'm not a coder
Did you perhaps make an MT4 indicator from this?
Would so love to have one...
Starfishy
Cape Town
South Africa
Comment
-
for MT4
i'm sorry, i don't have MT4 at all. Is it downloadable/free? I'd write it for you.
I didn't realize I had so many problems with my original code. Reading through the list here makes me aware of them.
I've not picked it up in a while but will at least fix this and post it again once I test it out.
I'm not sure if NT made their own version for NT8 or not. I wrote this, hoping it would be a useful tool for coders to add onto with other bar drawing indicators. Does NT8 use the same coding language/protocol?
I wrote another I called the 'slither stop' which moves your stop loss to the bottom of "x-range bar'...so if its set to 5, the stop will be set to the lowest low of the last 5 bars. As each new bar is printed, if there is now a higher, lowest low, it will move the stop up to that level.Last edited by Darth_Trader; 04-06-2018, 02:35 AM.
Comment
-
Hello Terso,
Thank you for your post.
While ordinarily we don't convert indicators for clients, this was a very simple conversion for NinjaTrader 8 that I have completed as a courtesy. It can be found on our User App Share via this publicly available link:
This is a conversion of the NT7 Colored Scalp Bar indicator from this forum thread: https://ninjatrader.com/support/forum/forum/ninjatrader-7/indicator-development-aa/75862-how-do-i-determine-if-a-bar-closes-at-the-top-25-of-the-bars-range
Here is a basic guideline of how to import NinjaScript add-ons in NinjaTrader 8:
Note — To import NinjaScripts you will need the original .zip file.
To Import:- Download the NinjaScripts to your desktop, keep them in the compressed .zip file.
- From the Control Center window select the menu Tools > Import > NinjaScript Add-on...
- Select the downloaded .zip file
- NinjaTrader will then confirm if the import has been successful.
Critical - Specifically for some NinjaScripts, it will prompt that you are running newer versions of @SMA, @EMA, etc. and ask if you want to replace, press 'No'
Once installed, you may add the indicator to a chart by:- Right click your chart > Indicators... > Select the Indicator from the 'Available' list on the left > Add > OK
Please let me know if I can be of further assistance.
The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.
Kate W.NinjaTrader Customer Service
- Likes 1
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by algospoke, Today, 06:40 PM
|
0 responses
4 views
0 likes
|
Last Post
by algospoke
Today, 06:40 PM
|
||
Started by maybeimnotrader, Today, 05:46 PM
|
0 responses
7 views
0 likes
|
Last Post Today, 05:46 PM | ||
Started by quantismo, Today, 05:13 PM
|
0 responses
6 views
0 likes
|
Last Post
by quantismo
Today, 05:13 PM
|
||
Started by AttiM, 02-14-2024, 05:20 PM
|
8 responses
168 views
0 likes
|
Last Post
by jeronymite
Today, 05:00 PM
|
||
Started by cre8able, Today, 04:22 PM
|
0 responses
9 views
0 likes
|
Last Post
by cre8able
Today, 04:22 PM
|
Comment