Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Idea for study to plot an instrument chart sliced in cycles & in dollar change terms

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • futurenow
    replied
    Originally posted by NinjaTrader_Kate View Post
    Hello futurenow,

    Thank you for your patience.
    Thanks to you for taking your time and for the example you have created that it could useful for the other users too.



    I've created an example indicator that modifies the Candlestick Indicator Example from our publicly available User App Share found here:

    https://ninjatraderecosystem.com/use...cators-sample/

    The version below is modified to show each bar's net change in price over a monthly span and resets to 0 at the beginning of each new month. You could modify this to use different reset intervals, perhaps weekly or per session. The linked indicator above is helpful for creating indicators you'd like displayed in a Candlestick type format.
    I see the net change and the resets are working properly, as should, perfect! Thank you Kate! You are the best!



    Please let us know if we may be of further assistance to you.
    Yes, thank you. Now I’m analyzing something, there is a process I do manually and I think it could be more efficient if it is done directly by code. Ok, that process is I plot some overlaid symbols, for example 2 symbols like the ES and the CL, both in the same chart panel, and each one independently from the other, so basically what is called "overlaid". Well, what I actually do to get that result is to add the indicator twice and plot the resulting charts both in the same panel, which visually provides a good result but in fact what is running in the background is the same indicator twice and I would like to have the way to get that kind of plots with only 1 single indicator, because if I need 3 symbols then what is needed is an extra 3rd instance of the indicator, which is not efficient.

    I tried to search in the Ecosystem site but I couldn’t find any idea to use as base to start to work with:


    I will leave a picture to have a visual idea about the result I’m explaining for a 2 overlaid symbols example.

    Click image for larger version

Name:	Visual illustration - 2 overlaid charts (ES and CL).png
Views:	340
Size:	63.4 KB
ID:	1156705

    Leave a comment:


  • NinjaTrader_Kate
    replied
    Hello futurenow,

    Thank you for your patience.

    I've created an example indicator that modifies the Candlestick Indicator Example from our publicly available User App Share found here:

    This is a sample of how to create an indicator in Candlestick (OHLC), which was tooked from the Spread Indicator with Candlesticks developed by kdoren and originally coded for the NinjaTrader 7 platform by NinjaTrader_AdamP.


    The version below is modified to show each bar's net change in price over a monthly span and resets to 0 at the beginning of each new month. You could modify this to use different reset intervals, perhaps weekly or per session. The linked indicator above is helpful for creating indicators you'd like displayed in a Candlestick type format.

    Please let us know if we may be of further assistance to you.

    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.
    Attached Files

    Leave a comment:


  • futurenow
    replied
    Thank you Kate

    As we do not have any examples of what you're looking for, I will see if I can come up with a very basic example you can use for a starting point, however, this will not be completed today. Please note that the samples we provide are intended to give you further direction to move forward, and are not intended to be used for copy and paste purposes.
    I just can say thank you for the example you talk about to use as starting point, and yes, I understand it can take time not being ready today.

    And about what you comment, yes, I understand what you explain, and my questions were just for that, to have an starting point with which to take some ideas and after that to be able to start to develop the concepts I could have in mind. For that reason I asked you to know if in any of your sites is there anything that could be used to take one or more ideas because I thought that among hundreds of indicators it could be something maybe not similar but that could show for example how is the process to take the quote data from a ticker (in this example the ES) showing how to work with this data in the way you need, in this case for example checking for each tick move and representing and plotting that in a chart in dollar value change (net change) instead of the ES current chart value that for example at this moment I see is 4,158.25.

    So, as after you could check the pictures with the mock-up idea you could confirm there is not examples about what I'm looking for, then I really appreciate you taking the time and dedication to provide an example as starting point.

    Just one final note, in the main question an extra picture is now submitted, just to see what would be the original standard chart form, from which the indicator would "convert" to the way I describe. In others words to better see what would be the original plain form a chart is shown, and then the "conversion" (if is the correct way to say this) the indicator would make and plot as result.

    Thank you very much

    Leave a comment:


  • NinjaTrader_Kate
    replied
    Hello futurenow,

    Thank you for your reply.

    Just to be clear, in platform support, we do not create/write strategies, we do not provide debugging services. We also cannot provide programming education services. If you would like the strategy created for you, we can provide references to 3rd party programmers who could meet your needs.

    That being said, I usually suggest if you're not familiar with using DateTime objects to create time and date comparisons, that you set a few up in a Strategy Builder window and unlock the code to see how they are structured:



    This example from our help guide goes into how you can manipulate DateTime objects to use for comparisons:



    As we do not have any examples of what you're looking for, I will see if I can come up with a very basic example you can use for a starting point, however, this will not be completed today. Please note that the samples we provide are intended to give you further direction to move forward, and are not intended to be used for copy and paste purposes.

    Thanks in advance; I look forward to assisting you further.

    Leave a comment:


  • futurenow
    replied
    Thank you for your quick reply Kate,

    Originally posted by NinjaTrader_Kate View Post
    It's a little unclear exactly what you're looking for here. What it sounds like you're wanting is getting the netchange from an arbitrary starting point and plotting it, is that correct?
    I will attach 2 pictures for better understand the kind of result the indicator should show, just as example. But yes, I think "netchange" could be the keyword when I talk about “dollar change”. In the pictures you can confirm this. In this case, getting the netchange of ES from a defined specific staring point to an ending specific point, i.e. if the cycle is monthly (every month), then the cycle starts the first tradable day in the month and ends the last tradable day in that month.


    You could use time checks or date checks to reset your "cycle" when you wish and set a private variable to 0 at each reset. You could then add the difference in prices divided by TickSize to that variable as more bars develop and plot the resulting values.
    Now you see the attached pictures and having a better idea about the result, is there a thread, a template or any kind of starting point I could use to start to complete the code with the details I need?

    I tried going to https://ninjatraderecosystem.com/user-app-share/ but there are around 900 indicators, so if you or your coworkers could please provide that starting point it will be a light in the darkness for me In case you don’t remember any example, please ask to the developers if possible.


    I also made a search in https://ninjatrader.com/support/help...erence_wip.htm but I couldn’t find ‘time checks’ or ‘date checks’ to see some examples about how they work, because I haven’t seen or used them for now.

    A staring point could be the code portion, or even a more complete example or examples about:
    • How to set the instrument, in this example the ES future
    • How to convert the ES quote to netchange shown as dollar value, that it would be something like multiplying the ES tick moves per 12.50 to show the dollar value change in every moment, tick-by-tick in real time or in market replay.
    • And how to set the cycle specifying in the code if the cycle is ‘Month’, then start at the every tradable day when you find a new staring month, and then ends the cycle at the end of that month. Then reset the plot to 0 and do the same again with the next month, and so on.

    I’m still learning in the indicators development process, and normally once I obtain a guide, or example or starting point with some code portions examples, normally I’m able to continue, sometimes with help, some others times slowly, but improving step by step, so thank you Kate.

    Click image for larger version

Name:	Standard chart with comments.png
Views:	331
Size:	142.2 KB
ID:	1154673

    Click image for larger version  Name:	Chart based in Dollar change within cycles - 1.png Views:	0 Size:	97.5 KB ID:	1154539


    Click image for larger version  Name:	Chart based in Dollar change within cycles - 2.png Views:	0 Size:	200.1 KB ID:	1154538





    Last edited by futurenow; 05-04-2021, 05:00 PM.

    Leave a comment:


  • NinjaTrader_Kate
    replied
    Hello futurenow,

    Thank you for your post.

    It's a little unclear exactly what you're looking for here. What it sounds like you're wanting is getting the netchange from an arbitrary starting point and plotting it, is that correct?

    You could use time checks or date checks to reset your "cycle" when you wish and set a private variable to 0 at each reset. You could then add the difference in prices divided by TickSize to that variable as more bars develop and plot the resulting values.

    I wouldn't have any examples that would be specific to this, however. If that's not quite what you're looking to do, can you provide a mockup of what you're looking for?

    Thanks in advance: I look forward to assisting you further.

    Leave a comment:


  • Idea for study to plot an instrument chart sliced in cycles & in dollar change terms

    Hello

    I need guide about a starting point to create a study or a kind of “indicator” to plot let’s say the ES (S&P future), but the plot need to be generated within 2 conditions:
    • The condition 1 is the chart plot be starting from 0 in a specified cycle, let’s say monthly cycle.
    • The condition 2 is the chart plot be in dollar change starting in $0 at the beginning of the defined cycle.

    Let’s put an example:
    Specifying and using the cycle called ‘Month’, it means the chart will show from Sunday to Friday the plot of the ES, starting in $0 on Sunday at the open market time, and after this the study will start drawing the chart just as the ES does, but the generated chart instead to be drawn as a standard chart, let’s say plotting:
    4,100.00
    4,100.25
    4,100.50
    4,100.25
    4,100.00
    4,099.75
    4,099.50


    Instead of that, the ES quote values the indicator would generate are the ES changes from the beginning of the cycle, just as a normal chart but not showing the real quotes, no, showing the tick dollar value changes:
    $0.00
    $12.50
    $25.00
    $12.50
    $0.00
    -$12.50
    -$25.00

    … and so on until the last tick at the end of the specified kind of cycle, in this case on Friday at the market close time.

    I don’t know how start to work with this, to take the ES quote, to specify that the chart be divided by cycles, like a kind of slices of the ES standard chart, then specify it need to start from $0 and after this keep plotting and drawing the chart but in terms of dollars change from the start point.

    I haven't seen anything similar to take it as a starting point and I would
    like to ask to the person that will give the answer, that please ask to the others coworkers in the development area to see if someone could provide maybe a template or any code portion with which I could start

    Thank you
    Last edited by futurenow; 05-03-2021, 12:01 PM.

Latest Posts

Collapse

Topics Statistics Last Post
Started by CarlTrading, 05-11-2026, 05:56 AM
0 responses
28 views
0 likes
Last Post CarlTrading  
Started by CarlTrading, 05-10-2026, 08:12 PM
0 responses
20 views
0 likes
Last Post CarlTrading  
Started by Hwop38, 05-04-2026, 07:02 PM
0 responses
183 views
0 likes
Last Post Hwop38
by Hwop38
 
Started by CaptainJack, 04-24-2026, 11:07 PM
0 responses
336 views
0 likes
Last Post CaptainJack  
Started by Mindset, 04-21-2026, 06:46 AM
0 responses
261 views
0 likes
Last Post Mindset
by Mindset
 
Working...
X