NexusFi: Find Your Edge


Home Menu

 





Math help needed! Point of intersection of price and fast MA?


Discussion in Platforms and Indicators

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




 
Search this Thread
  #11 (permalink)
userque
Chicago IL
 
Posts: 180 since Apr 2016
Thanks Given: 573
Thanks Received: 130


Trader Kevin View Post
Of course. The formula for the middle band is the same EMA formula as before. The formula for the upper band of the Keltner Channel is : KC(upper band) = EMA + (ATR * KF) where KF is a constant that I will provide. ATR = max(high, close(previous)) - min (low, close(previous)). In word form, it is the largest of the: current high - current low, absolute value of the current high - previous close, or absolute value of the current low minus previous close.

Formula for the lower band is KC(lower band) = EMA - (ATR * KF)

I should also explain that I am not looking for the price where the price = the upper/lower bands at the previous 1 minute candle's close, but where they would meet in real time. In other words, what would price have to equal in order for it to close at the same price as the upper/lower bands?

Thanks!

Let me know if you need me to explain anything:
 
Code
Keltner Channels Scratch Paper and Raw Thoughts as They Occur:
As before:
ema=p * (1/3) + pema * (2/3)
Additionally:
KC(upper band) = EMA + (ATR * KF)
C=KF,ku=KC(upper band) 
ku = ema + atr.C
ATR = max(high, close(previous)) - min (low, close(previous))
FOUR DIFFERENT SCENARIOS:
atr=high-low where high>low, atr=high-pc, where high>pc, atr=pc-low, where pc>high, atr=pc-pc
ELIMINATE LAST POSSIBILITY:
atr=high-low where high>low, atr=high-pc, where high>pc, atr=pc-low, where pc>high
CONSIDERING FIRST SCENARIO:
ema=p * (1/3) + pema * (2/3)
ku = ema + atr.C
atr=high-low where high>low
high is always > low:
atr=high-low
SUBSTITUTION:
ku = ema + (high-low)C
SUBSTITUTION:
ku = p * (1/3) + pema * (2/3) + (high-low)C
LETTING ku=p:
p=p * (1/3) + pema * (2/3) + (high-low)C
TIMES 3
3p=p+2pema+3C(high-low)
MINUS p:
2p=2pema+3C(high-low)
DIVIDE BY 2:
p=pema+1.5*KF*(high-low), where low<=pc

AFTER DOING STUFF IN MY HEAD:

priceOfBandIntersection = previousEMA +/- (1.5 * KF * ("largest of the: current high - current low, absolute value of the current high - previous close, or absolute value of the current low minus previous close"))

Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
How to plot a custom icon for crossover
NinjaTrader
Brendt Skorupinsky
Trading Reviews and Vendors
Has anyone taken trading from Agnieska Wood - Ahead Coach?
Psychology and Money Management
What You Know vs How much you know about it
Traders Hideout
Is there a way to simulate CONTINUOUS CONTRACT?
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
ApexTraderFunding.com experience and review
143 thanks
1 Minute Man
64 thanks
HumbleTraders next chapter
35 thanks
Winning attitudes create winning traders
28 thanks
Vinny E-Mini & Algobox Review TRADE ROOM
25 thanks
  #12 (permalink)
Trader Kevin
Houston, Texas
 
Posts: 13 since Jun 2020
Thanks Given: 3
Thanks Received: 5

Thanks so much! I will test this out and see, but I'm sure you're right. Really appreciate it!

Edit: Tested it and it is perfect. Thanks again!

Reply With Quote
Thanked by:
  #13 (permalink)
userque
Chicago IL
 
Posts: 180 since Apr 2016
Thanks Given: 573
Thanks Received: 130



Trader Kevin View Post
Thanks so much! I will test this out and see, but I'm sure you're right. Really appreciate it!

Edit: Tested it and it is perfect. Thanks again!

Glad it's working out. Good luck!

Reply With Quote




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