NexusFi: Find Your Edge


Home Menu

 





Drawing a region from current Moving avg value to a certain number of bars back


Discussion in NinjaTrader

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




 
Search this Thread
  #1 (permalink)
 mavmoney 
boston usa
 
Experience: None
Posts: 6 since Mar 2019
Thanks Given: 0
Thanks Received: 1

Hello all,

I'm trying to wrap my mind around something that was easy to code in thinkscript, but is quite a challenge on ninjascript (ninjatrader 8).

I'm hoping you can help!

What I want to do is draw a cloud between two moving averages - but I only want it 50 bars back on the chart from the current bar - and I would like it to be a rectangular cloud just based on the current value of the moving avg.

I've attached an example from my think or swim chart.

Any help would be appreciated!


Attached Thumbnails
Click image for larger version

Name:	thinkscript example.png
Views:	327
Size:	55.5 KB
ID:	291858  
Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Daytrading to swingtrading
Traders Hideout
Thanks Mike. Godspeed.
The Elite Circle
Ninjatrader users - good CONNECTIONs post and article fr …
NinjaTrader
No book, only a stair: journaling fills where price move …
Cryptocurrency
Czechia Live at 52.5% as England Rides 4-2 Wave to Co-Fa …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Want your NinjaTrader indicator created, free?
5 thanks
Denied 20K payouts: Alpha Futures
1 thanks
FootPrintV2 Chart for NT8
1 thanks
BERN ALGOS algo trading journal
1 thanks
Afternoon-close session
1 thanks
  #3 (permalink)
Medge91
london ontario
 
Posts: 25 since Jul 2015
Thanks Given: 6
Thanks Received: 11


I am brand new to programming on NT8, but have had some minor successes. Not sure what specific problems you are having, but a region in NT8 will span all the bars. I think you want to draw a rectangle instead.

Maybe try using Draw.Rectangle ()
It lets you specify how many bars back


Good Luck,
Edge


Reply With Quote
  #4 (permalink)
 mavmoney 
boston usa
 
Experience: None
Posts: 6 since Mar 2019
Thanks Given: 0
Thanks Received: 1

Thank you Medge91!

That simple suggestion has gotten me so much closer to where I want to be!
Simply a Breakthrough.


Started this thread Reply With Quote




Last Updated on March 28, 2020


© 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