NexusFi: Find Your Edge


Home Menu

 





Highest high less than upper bollinger band


Discussion in NinjaTrader

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




 
Search this Thread
  #1 (permalink)
 
toddma's Avatar
 toddma 
vancouver canada
 
Experience: Intermediate
Platform: multicharts, ninjatrader
Trading: forex
Posts: 53 since Jul 2012
Thanks Given: 14
Thanks Received: 6

This is very basic question - apologies -
But how do I use the "highest bar" function in the condition builder? I would like to say something like if the highest bar (high of that bar) over the last 10 days is outside of an upper bollinger band then do not enter this trade.

So the condition to be met should just be:
highest bar (high, ideally) < upper bollinger band

Is that correct? It's not working for me for some reason.
Thanks in advance.


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Warsh Opens Today, Hormuz June 19 -- WTI Below $80, Fran …
Prediction Markets & Event Contracts
Would a node-based workflow for automated trading be useful?
Traders Hideout
White House Drops First Alien Files Today -- Market Says …
Prediction Markets & Event Contracts
Khamenei Vetoes Uranium Transfer as Peace Odds Surge to …
Prediction Markets & Event Contracts
Trump Truth Social Fires Hormuz From 10% to 59% -- Arsen …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
10 thanks
Darmok and Jalad at Tanagra
3 thanks
Big Mike in Ecuador
1 thanks
30 Sessions
1 thanks
  #2 (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: 845

You need to identify the bar index where the highest bar occured, then identify the high and bollinger value at that bar. I am pretty sure that you can't do this in the wizard, will probably have to manually edit.

use

High[HighestBar(High, int period)]

Bollinger(double numStdDev, int period).Upper[HighestBar(High, int period)]

for example

if(High[HighestBar(High, int period)] < Bollinger(double numStdDev, int period).Upper[HighestBar(High, int period)])
{do this super secret magical thing that is going to make me rich and everyone else will still be broke}


Reply With Quote
Thanked by:
  #3 (permalink)
 
toddma's Avatar
 toddma 
vancouver canada
 
Experience: Intermediate
Platform: multicharts, ninjatrader
Trading: forex
Posts: 53 since Jul 2012
Thanks Given: 14
Thanks Received: 6


Great thanks, I think it is working - but I was hoping for something that could look at a range of bars - for example "is there a bar that is outside of the bollinger within the last 20 periods?" rather than just "is the 10th bar back outside of the bollinger?"
I could definitely just repeat the formula, but I would imagine there is a better way... ? Any ideas?
Thanks again.


Started this thread Reply With Quote




Last Updated on July 17, 2012


© 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