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 1,904 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 3 posts
    2. attach_file 1 attachments




 
Search this Thread

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

  #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:	188
Size:	55.5 KB
ID:	291858  
Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
REcommedations for programming help
Sierra Chart
Trade idea based off three indicators.
Traders Hideout
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
ZombieSqueeze
Platforms and Indicators
Better Renko Gaps
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
33 thanks
Just another trading journal: PA, Wyckoff & Trends
28 thanks
Bigger Wins or Fewer Losses?
23 thanks
Tao te Trade: way of the WLD
23 thanks
GFIs1 1 DAX trade per day journal
21 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


© 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