Thanks for the help rigel! I'll play around with the code you provided. Funny... "but I think you get the idea." I don't know why, but the FOLD is just so confusing to me. I was kind of on the same path but so far my FOLD statement, while syntactically correct, only returns a result visible in the land of missing socks! Billby rubicon_wbd - Trading Discussion
I want the 4 values and the 4 bar numbers associated with each value.by rubicon_wbd - Trading Discussion
Hi, How would I find alternating highs and lows of a source value? source = moving average for example... what I am looking to do is find: barnumberA = barnumber of highest(source,100); valueA = source at barnumberA barnumberB = barnumber of lowest(source,barnumberA); valueB = source at barnumberB barnumberC = barnumber of highest(source,barnumber; valueCby rubicon_wbd - Trading Discussion
In this example, yes. Its really about referencing the defined enumeration variable. Maybe this is a better example: input mySymbol = {default "VXX", "SPY", "GDX" }; def myOtherSymbol = { default "VXX", "SPY", "GDX" }; myOtherSymbol = myOtherSymbol."GDX"; plot xyz = close(symbol=mySymbol); #^^^^^^ thby rubicon_wbd - Trading Discussion
Devildriver6, thanks for the reply. I should have been more clear as too what I am trying to accomplish. I want set a defined enumerated value based on a different user input. I don't want the user to have to set all the values. In my example, if the user selects VXX, I want to set a defined enumeration to SPY and another defined enumeration to AAPL. The user should only have toby rubicon_wbd - Trading Discussion
I am struggling with accessing a defined enumeration value. When an enumeration is an input I can access its value by variable reference. In the example below, referencing mySymbol returns "VXX" (assuming I've taken the default). However, when I access a defined enumeration, the variable reference seems to return the index of the value and not the value itself. How do I returby rubicon_wbd - Trading Discussion