NexusFi: Find Your Edge


Home Menu

 





can i add atr to this renko code?


Discussion in ThinkOrSwim

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




 
Search this Thread
  #1 (permalink)
yamin2000
Saudi Arabia
 
Posts: 58 since Apr 2014
Thanks Given: 26
Thanks Received: 4

hi

can i add atr to this renko code?

 
Code
# Renko
# Mobius

input brickSize = 10.0;

def c = close;
def bricks = CompoundValue(1, if c > bricks[1] + brickSize
then bricks[1] + brickSize
else if c < bricks[1] - brickSize
then bricks[1] - brickSize
else bricks[1] , bricks[1]);

plot bricks_ = Round(Bricks/TickSize(),0) * TickSize();
def mortar = CompoundValue(1, if bricks_ != bricks_[1]
then bricks_[1]
else mortar[1], mortar[1]);
plot mortar_ = Round(mortar/TickSize(),0) * TickSize();
AddCloud(bricks_, mortar_, color.green, color.red, yes);
# End Code


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Without Pulisic, USA 61.5% Live vs. Australia -- France …
Prediction Markets & Event Contracts
CME Group CEO Calls CFTC-Approved Crypto Perps Dangerous …
Traders Hideout
June 15 Peace Odds Surge From 3.6% to 12.25% After Trump …
Prediction Markets & Event Contracts
$500M Riding on World Cup 2026: France/Spain Co-Favored …
Prediction Markets & Event Contracts
The June 15 Resolution Trap: Irans Agreed Text Still Pri …
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)
yamin2000
Saudi Arabia
 
Posts: 58 since Apr 2014
Thanks Given: 26
Thanks Received: 4

Please possible or no?
So I can move on to another platform


Reply With Quote
  #3 (permalink)
yamin2000
Saudi Arabia
 
Posts: 58 since Apr 2014
Thanks Given: 26
Thanks Received: 4


i did some research

is this correct ?


 
Code
# Renko
# Mobius
 

input price = close;
input length =100;
input displace = 0;
def atr = ATR();

def c = close;
def bricks = CompoundValue(1, if c > bricks[1] + ATR
then bricks[1] +ATR
else if c < bricks[1] -ATR
then bricks[1] -ATR
else bricks[1] , bricks[1]);

plot bricks_ = Round(Bricks/TickSize(),0) * TickSize();
def mortar = CompoundValue(1, if bricks_ != bricks_[1]
then bricks_[1]
else mortar[1], mortar[1]);
plot mortar_ = Round(mortar/TickSize(),0) * TickSize();

# End Code


Reply With Quote
  #4 (permalink)
yamin2000
Saudi Arabia
 
Posts: 58 since Apr 2014
Thanks Given: 26
Thanks Received: 4

any help ?yes or no? plz


Reply With Quote
  #5 (permalink)
chtulhu
Nashville+Tennessee
 
Posts: 8 since Feb 2020
Thanks Given: 1
Thanks Received: 3

make the code a new study. test it.


Reply With Quote
  #6 (permalink)
 jmont1 
New York, NY
Legendary Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader8
Broker: Data = Rithmic -- Gives 70 Level II Data
Trading: 6C (Low Margin,) 6E, CL, GC, ES and Maybe DX for smaller tick value
Posts: 1,418 since May 2011
Thanks Given: 1,728
Thanks Received: 1,024


yamin2000 View Post
i did some research

is this correct ?


 
Code
# Renko
# Mobius
 

input price = close;
input length =100;
input displace = 0;
def atr = ATR();

def c = close;
def bricks = CompoundValue(1, if c > bricks[1] + ATR
then bricks[1] +ATR
else if c < bricks[1] -ATR
then bricks[1] -ATR
else bricks[1] , bricks[1]);

plot bricks_ = Round(Bricks/TickSize(),0) * TickSize();
def mortar = CompoundValue(1, if bricks_ != bricks_[1]
then bricks_[1]
else mortar[1], mortar[1]);
plot mortar_ = Round(mortar/TickSize(),0) * TickSize();

# End Code

@yamin2000 You should be posting this in this thread below. But an ATR of 10,0 renko will always be about 10 since all the bars average 10. You would need to add a time based data set to get the variable average range.


Reply With Quote




Last Updated on June 2, 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