TC2000.com• Download software • Tutorial videos • Subscription & data-feed pricing • Class schedule
TC2000Brokerage.com• New account application • Trading resources • Margin rates • Stock & option commissions
Worden Discussion Forum
End result was that the linear regression was rounding to the hundredths place (0.00) in the calculations concerning the condition. The solution was to open the block diagram from the edit menu of the condition and insert a "Multiply by Value" block and set it to a big enough number to bring the value of the LR into a range where rounding didn't cause issues. In my case I had to use 1000-10000 for the two LRs in my condition.
The period is 14. Its odd it just shows up sporadically. Always correct but is missing lots of bars that should be correct too.
Ok new problem. >.<
My condition doesn't seem to refer to historical data correctly.
'# LRS = chart.LinearRegressionSlope.3
Oh I did not know that was possible. Thank you... that opens a lot of doors for me.
Honestly thank you so much!
I want to call the value of a linear regression slope of indicator that is a child of a 200 exponential moving average of price. Is there any way to call this value in Real Code. I can't seem to figure out how to call it and the math would be quite complex to do manually best as I can figure.
I have another issue I'm trying to fix and searching hasn't turned up a solution. I am telling a variable to be defined as price.Close(X) where X is user defined. But really what I want is for that variable to store the value of price.Close(X) for future bars to compare against until the variable is redefined as a new value. Is there a way to do this?
Thresh and Hold are the variables that are not sticking to the value for the bar in which they are defined. Clearly I'm doing it wrong and need the proper coding to do what I'm after. As an aside the code might have some redundant elements like Exit Function and Plots as I've been troubleshooting but this is where it's at right now. Also Starting Trend as "Down" is sort of a workaround at the moment.
Thank you in advance,
Here is the code:
The solution was that there was an undeclared number for "period" in the block diagram. They worked with me to fix it and get it defined.
Having trouble with the following:
I was running the above code along with some simlar code to generate an indicator that would range in values of 3, 1, -1, and 0. Basically Elder Impulse with 3C added in as a third qualifier. The problem was that if I coded both components of Elder Impulse and the component of 3C it would stack overflow and crash.
The solution was to just code the EI components and 3C component separately and then drag them together to do a Plot Comparison and select Add.
The end result is what I was after and doesn't seem to crash the program yet.
Sorry for a now useless post but maybe people can learn from my amateur fumbling around.