NexusFi: Find Your Edge


Home Menu

 





Stochastics min/max Prediction within range bar


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one monpere with 6 posts (12 thanks)
    2. looks_two vegasfoster with 6 posts (7 thanks)
    3. looks_3 gain247 with 6 posts (0 thanks)
    4. looks_4 max-td with 2 posts (0 thanks)
      Best Posters
    1. looks_one monpere with 2 thanks per post
    2. looks_two Big Mike with 2 thanks per post
    3. looks_3 cbritton with 2 thanks per post
    4. looks_4 vegasfoster with 1.2 thanks per post
    1. trending_up 12,677 views
    2. thumb_up 23 thanks given
    3. group 3 followers
    1. forum 24 posts
    2. attach_file 8 attachments




 
Search this Thread

Stochastics min/max Prediction within range bar

  #21 (permalink)
 
gain247's Avatar
 gain247 
Helsinki, Finland
 
Experience: Advanced
Platform: NT8
Broker: NTB
Trading: ES, CL
Posts: 131 since Apr 2010
Thanks Given: 125
Thanks Received: 123


vegasfoster View Post
I haven't watched it in real time, but I think all the problems are fixed. I also renamed it because it technically is different than mopere's original and so people don't get confused it they like the original better. Thanks again @ monpere for your help.

Hi vegasfoster, I have now watched this a few days in real time and it looks the opening bar stochastics range plots are not quite right... actually it seems to be only the 'reversing' direction stoch range plot that is too 'wide' and it doesn't correct even when the price bar developes. When I push F5 (Reload Ninjascript) it does correct, however. Not a big deal, I can always use F5 when a new bar opens, but just wanted to report this bug if it's easy to correct.

Thanks again for a great indicator!

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Quant vue
Trading Reviews and Vendors
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
NexusFi Journal Challenge - May 2024
Feedback and Announcements
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
MC PL editor upgrade
MultiCharts
 
  #22 (permalink)
 vegasfoster 
las vegas
 
Experience: Intermediate
Platform: Sierra Chart
Broker: Velocity/IB
Trading: 6E
Posts: 1,145 since Feb 2010
Thanks Given: 304
Thanks Received: 844


gain247 View Post
Hi vegasfoster, I have now watched this a few days in real time and it looks the opening bar stochastics range plots are not quite right... actually it seems to be only the 'reversing' direction stoch range plot that is too 'wide' and it doesn't correct even when the price bar developes. When I push F5 (Reload Ninjascript) it does correct, however. Not a big deal, I can always use F5 when a new bar opens, but just wanted to report this bug if it's easy to correct.

Thanks again for a great indicator!

Yeah, thanks for the heads up. Max pointed that out to me yesterday, I just haven't had a chance to look at it. Will try to fix it later today unless someone beats me to it. I am using the JtRangeMarker code and my skills are limited so I may need help to fix it, not sure yet.

Reply With Quote
  #23 (permalink)
 vegasfoster 
las vegas
 
Experience: Intermediate
Platform: Sierra Chart
Broker: Velocity/IB
Trading: 6E
Posts: 1,145 since Feb 2010
Thanks Given: 304
Thanks Received: 844


So, the plot is being reset each bar to the prior K value, but the input to the plot is not being reset in the same fashion to the prior Close value so we are essentially having the same problem as before. Monpere's fix to reset the K value works on a data series, but the input was not a data series. So I went back to using a dataseries for the input but what I am doing is not working.

I need the prior hinput value to be "Close[1]" and the current value to be "Low[0] + (Bars.Period.Value+1)*TickSize" so that I can feed it into the rest of the calculations. I don't know how to do it, so any help would be appreciated, thank you.

This is what I am trying.

 
Code
 
if ( FirstTickOfBar && CurrentBar > 0 ) 
{
hinput.Set(1, Close[1]);
linput.Set(1, Close[1]);
} 
 
elseif ( onRangeClose && CurrentBar == Bars.Count-1 ) 
 
{
//### Draw Next Range Bar price markers

if ( Bars.Period.Id == PeriodType.Range || Bars.ToString().Contains("Kase") ) 
{
hinput.Set(Low[0] + (Bars.Period.Value+1)*TickSize); //### Bar Extreme
linput.Set(High[0] - (Bars.Period.Value+1)*TickSize); //### Bar Extreme
}
 
else
if ( Bars.ToString().Contains("RangeNoGap") ) 
{
hinput.Set(Low[0] + (Bars.Period.Value+1)*TickSize); //### Bar Extreme
linput.Set(High[0] - (Bars.Period.Value+1)*TickSize); //### Bar Extreme
}
 
} 

Reply With Quote
  #24 (permalink)
 
PHXtrader's Avatar
 PHXtrader 
Boston
 
Experience: Intermediate
Platform: Jigsaw
Trading: NQ
Posts: 84 since Apr 2011
Thanks Given: 48
Thanks Received: 76


monpere View Post
I added a couple of lines to reset the previous bar values of the projected High/Low plots to the values of the normal plot. That's quick and dirty to take care of that problem. If you are only looking at the projected high and low close plots to make decisions, then I would suggest only plotting those, and eliminating the middle plot to save memory and processing time for each running instance of the indicator.

monpere

Do you still use this indicator? If so how has it been working for you? Do you know if all the bugs ever got worked out?

Visit my NexusFi Trade Journal Reply With Quote
  #25 (permalink)
 
monpere's Avatar
 monpere 
Bala, PA, USA
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Mirus, IB
Trading: SPY, Oil, Euro
Posts: 1,854 since Jul 2010
Thanks Given: 300
Thanks Received: 3,372


PHXtrader View Post
monpere

Do you still use this indicator? If so how has it been working for you? Do you know if all the bugs ever got worked out?

I don;t use this particular indicator. I just provided a workaround for the issue he was having with the normal plotting. Later he was trying to do something else, but I did not understand what he was trying to do.

Reply With Quote




Last Updated on August 6, 2011


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts