NexusFi: Find Your Edge


Home Menu

 





Hello!! of an ocsilator in ninjatrader 8 min, max


Discussion in NinjaTrader

Updated
    1. trending_up 1,402 views
    2. thumb_up 1 thanks given
    3. group 2 followers
    1. forum 1 posts
    2. attach_file 2 attachments




 
Search this Thread
  #1 (permalink)
Truenomax
Argentina
 
Posts: 1 since Feb 2021
Thanks Given: 1
Thanks Received: 0

Hello!! of an ocsilator in ninjatrader 8, how can you choose the maximum high and the maximum low of the ocsilator but with a minimum of x amount of histogram bar and -10% of maximum of the minimum .. and for the maximum minimum vice versa being ocsilator> 0 for maximum and minimum ocsilator <0


Attached Thumbnails
Click image for larger version

Name:	MES 12-21 (5 Minuto) 2021_10_25 (09_02_27).png
Views:	141
Size:	11.1 KB
ID:	319072  
Attached Files
Elite Membership required to download: ejemplo_max_min.zip
Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Weekend Update: First Qatari LNG Transit Attempted -- IR …
Traders Hideout
March Jobs Report Update: 178K Beat vs 59K Expected, Wag …
Traders Hideout
Iran Ceasefire Surges to 19.5% on US 15-Point Plan -- 82 …
Prediction Markets & Event Contracts
Iran Airspace Collapses 18 Points to 15.5% While Hormuz …
Prediction Markets & Event Contracts
Eurex Eyes Prediction Markets -- Europes Biggest Derivat …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
21 thanks
2026 Jlab journal
10 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Lady Vols Primer: Trading Volatility Journal
6 thanks
2026 Fire Horse
5 thanks
  #2 (permalink)
 hedgeplay 
Austin Texas / US
 
Experience: Intermediate
Frequency: Several times daily
Duration: Seconds
Posts: 216 since Dec 2019
Thanks Given: 159
Thanks Received: 241


Truenomax View Post
Hello!! of an ocsilator in ninjatrader 8, how can you choose the maximum high and the maximum low of the ocsilator but with a minimum of x amount of histogram bar and -10% of maximum of the minimum .. and for the maximum minimum vice versa being ocsilator> 0 for maximum and minimum ocsilator <0

A few tricks that chop the top and allow the indicator to better pass the "c-test" and so be usable across multiple instruments and time frames:

1) Limit output to Values[0][0] to a max of 10% of HighestBar() and LowestBar(), if your lookback is short enough to stomach the CPU cost of HighestBar() & LowestBar().
If peaks of your highs and lows match then you might just use one of the two e.g. HighestBar(Math.Abs(indicatorResults[0]))
https://ninjatrader.com/support/helpGuides/nt8/NT%20HelpGuide%20English.html?highestbar.htm
https://ninjatrader.com/support/helpGuides/nt8/NT%20HelpGuide%20English.html?lowestbar.htm


2) Run ATR() on Math.Abs() of the results and limit output to Values[0][0] to a to max only x.x StdDevs .

3) Run a long EMA() on Math.Abs() of the results and and limit output to Values[0][0] to a max of x.x of the EMA()

If your lookback period is very long I like the EMA() approach. The EMA() approach is more of a bottoms up rather than exact 10% approach but it is reasonably low cost and continually adjusts to changing indicator volatility.

 
Code
// something like..   ( a ternary is cleaner but an if-else is easier to read)

double indcatorResultsDbl = 0; 
if((indicatorResults[0]  < (1.6 * EMA(indcatorResults, 800)[0] )  indcatorResultsDbl = indcatorResults;  
else indcatorResultsDbl = 1.6 * EMA(indcatorResults, 800)[0];
.


HedgePlay


Reply With Quote
Thanked by:




Last Updated on October 29, 2021


© 2026 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 - Downloads - Top
no new posts