NexusFi: Find Your Edge


Home Menu

 





Distance to moving average


Discussion in NinjaTrader

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




 
Search this Thread
  #1 (permalink)
 calvin11 
madrid/spain
 
Experience: Beginner
Platform: ninjatrader
Trading: es
Posts: 5 since Nov 2011
Thanks Given: 6
Thanks Received: 1

Hi ... I wanted to create an indicator that measures the distance between the price and a moving average, in a percentage.Ninjatrader 8
Could someone help.
Thank you...


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Victory Day Delivers: Russia-Ukraine Ceasefire Market Cl …
Prediction Markets & Event Contracts
Fabrication or Framework? Irans Denied MOU Explains the …
Prediction Markets & Event Contracts
El Clasico Draws $9.2M in Prediction Market Action -- Bi …
Prediction Markets & Event Contracts
World Cup Opens: USA at 45.5% Tonight as Markets Push Ba …
Prediction Markets & Event Contracts
$500M Riding on World Cup 2026: France/Spain Co-Favored …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
8 thanks
Darmok and Jalad at Tanagra
1 thanks
  #2 (permalink)
 
WoodyFox's Avatar
 WoodyFox 
Columbus, Ohio
 
Experience: Intermediate
Platform: NinjaTrader
Trading: Futures
Posts: 417 since May 2016
Thanks Given: 206
Thanks Received: 891

Something Like this?


Attached Files
Elite Membership required to download: MAPriceDifference.cs
Reply With Quote
Thanked by:
  #3 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Legendary Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Interactive Brokers
Trading: Futures & Stocks
Posts: 9,887 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,117



calvin11 View Post
Hi ... I wanted to create an indicator that measures the distance between the price and a moving average, in a percentage.Ninjatrader 8
Could someone help.
Thank you...

Edit the MACD and save it under a different name. Then set the fast period of the MACD to 1. It now displays the distance between price and the slow EMA.
To display this distance as a percentage, divide it be the bar close and multiply it with 100.

In case that you wish to use another moving average, just replace the EMA with something else.


Reply With Quote
Thanked by:




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