I wanted to know if I should be posting here or another part of the forum about modifying a bar type code to add a Tick reversal option in the data series for the Sverenko.
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
Modification to bar type
Collapse
X
-
Hello Ken7787,
Thanks for your post.
I have moved your post to the NinjaTrader Desktop General Development section of the forums since it is not specifically related to Indicator Development.
That said, the SveRenko barstype script from the Ecosystem User App Share uses custom logic and it would be up to you to come up with the custom logic to modify the script to add a Tick reversal option.
You could consider reviewing the UniRenko barstype script from the Ecosystem User App Share which has Tick reversal to see how this might be accomplished.
UniRenko: https://ninjatraderecosystem.com/use...nko-bartype-8/
This forum thread will also be open for other community members to share their insights.
Let me know if you have further questions on this.
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.Brandon H.NinjaTrader Customer Service
-
Hello!
Thank you for moving the post.
I wanted to know if I'm on the right track. I was able to put in some code to add for the reversal type box in data series. I can see the tick trend showing up at
ApplyDefaultValue(BarsPeriod period)
{
period.Value = 10;
But no way to change the numeric value for reversal type box in data series .
namespace NinjaTrader.NinjaScript.BarsTypes
{
public class SveRenkoNT8 : BarsType
{
private double renkoMax;
private double renkoMin;
protected override void OnStateChange()
{
if (State == State.SetDefaults)
{
Description = @"SV Renko Type";
Name = "SveRenkoNT8";
BarsPeriod = new BarsPeriod { BarsPeriodType = (BarsPeriodType) 1414, BarsPeriodTypeName = "SveRenkoNT8(14)", Value = 1 };
BuiltFrom = BarsPeriodType.Tick;
DefaultChartStyle = Gui.Chart.ChartStyleType.CandleStick;
DaysToLoad = 3;
IsIntraday = true;
IsTimeBased = false;
}
else if (State == State.Configure)
{
Name = string.Format(Core.Globals.GeneralOptions.CurrentC ulture, "SveRenko", BarsPeriod.Value);
Properties.Remove(Properties.Find("BaseBarsPeriodT ype", true));
Properties.Remove(Properties.Find("BaseBarsPeriodV alue", true));
Properties.Remove(Properties.Find("PointAndFigureP riceType", true));
Properties.Remove(Properties.Find("Reversal type", true));
Properties.Remove(Properties.Find("Value2", true));
SetPropertyName("Value", "Tick Trend");
SetPropertyName("Value2", "Tick reversal");
I got part of what I want, now just putting the rest together.
Comment
-
Hello Ken7787,
Thanks for your note.
Yes, you are on the right track.
The default Tick Reversal property value is set in the ApplyDefaultValue class in the UniRenko BarsType script. This could be seen on line 69 in the UniRenko script.
The 'reversalOffset' value could be seen in the script on line 102 for calculating values if the Bars object is mid-session. On line 116 you could see how 'reveralOffset' is set on the first bar in the UniRenko BarsType script.
Please let me know if I may assist further.Brandon H.NinjaTrader Customer Service
Comment
-
I think that's for the unirenko bar type. The bar type i have is the SverenkoNT8 from the ecosystem.Attached Files
Comment
-
Hello Ken7787,
Thanks for your note.
It seems like this is not included in the SveRenkoNT8 script from the Ecosystem User App Share. You would need to add this logic to the script if you want it included.
As stated in post # 2, "the SveRenko barstype script from the Ecosystem User App Share uses custom logic and it would be up to you to come up with the custom logic to modify the script to add a Tick reversal option."
You could compare the UniRenko script to the SveRenko script to see how you might go about accomplishing adding a tick reversal option.
Let me know if I may assist further.Brandon H.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by proptradingshop, 03-21-2024, 09:50 AM
|
5 responses
25 views
0 likes
|
Last Post Today, 05:17 AM | ||
Started by MaupinFinche, Today, 05:08 AM
|
0 responses
2 views
0 likes
|
Last Post
by MaupinFinche
Today, 05:08 AM
|
||
Started by Enkidu, Yesterday, 06:40 AM
|
9 responses
35 views
0 likes
|
Last Post
by Enkidu
Yesterday, 01:11 PM
|
||
Started by Mestor, 03-10-2023, 01:50 AM
|
12 responses
307 views
0 likes
|
Last Post
by z.franck
Today, 04:29 AM
|
||
Started by AgriTrdr, 07-16-2023, 12:54 PM
|
32 responses
268 views
0 likes
|
Last Post
by f.saeidi
Yesterday, 06:49 AM
|
Comment