NexusFi: Find Your Edge


Home Menu

 





I don't know how to get this correlation function to work...


Discussion in Platforms and Indicators

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




 
Search this Thread

I don't know how to get this correlation function to work...

  #1 (permalink)
lighteningmcqueen
Bath + Somerset
 
Posts: 2 since Jun 2017
Thanks Given: 0
Thanks Received: 0

Hi,

I really want to know how to implement this. I want to measure correlation between instruments but the correlation range needs to dynamically be determined. I tried to find ways to implement the array as a number by using LastValue ( range ) but this seems to default to 0 and doesn't work. It looks like I need to implement some kind of a loop but don't know how to do it.

Say we have this below

bi = BarIndex();
S = Cross(MA(C, 4), MA(C,8));
c1 = ValueWhen( S, MA(C, 4), 1) > ValueWhen( S, MA(C, 4), 2);
Range = ValueWhen( S, bi, 1) - ValueWhen( S, bi, 2);
c2 = Correlation(C, Foreign("APPL", "C"), Range) > 0.7;

// You can see the correlation between the stocks are determined by the two cross over points which always changes.

Buy = c1 and c2;

Please help me implement this !

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
ZombieSqueeze
Platforms and Indicators
Futures True Range Report
The Elite Circle
Are there any eval firms that allow you to sink to your …
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
39 thanks
NexusFi site changelog and issues/problem reporting
26 thanks
Battlestations: Show us your trading desks!
26 thanks
The Program
18 thanks
  #2 (permalink)
 iildm 
Italy
 
Experience: Beginner
Platform: AmiBrojer,NinjaTrader,ProRealTime
Trading: STOXX
Posts: 8 since Feb 2011
Thanks Given: 170
Thanks Received: 6

Hi,
please search for "Correlation for Period as Array" in old Amibroker forum (around May 22, 2016)
Good luck and Regards
Luca

Reply With Quote




Last Updated on July 6, 2017


© 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