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
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.
Thanks for getting this far. I have fixed all the above issues by remaking the 3C in real code.
The problem I have now is that my real code indicator in the above post that is based on my remake of 3C is crashing Stockfinder everytime I try to run the code. Seems like a stack overflow so now I'm stuck again.
Ok I've fixed the errors coming up. The real code doesn't like indicators described with a number in the front. The problem I have now is that it will not plot anything.
I can get to the block diagram if that helps.
I'm having trouble importing an indicator that someone else has written into the real code editor to use for some math etc. Long story short if the current bar is higher than the previous bar in terms of the value of this indicator I want it to return a 1 and if it is lower a -1. That part I have worked out as I use it for other standard indicators like a moving average or a MACD histogram.
However, when I try to import this indicator it gives an "Identifier Expected" error and I haven't even written any code yet. It says it is on line 20 and 26.
My best guess is that the parameters for the indicator are being asked for but I can't get to them. I know the indicator was done in real code before by the author but I can't seem to get to the code to look at it. If I could rewrite the code in a fresh indicator that might work. It was originally done in Telechart so not sure what the code would be now in Stockfinder. Here's what I have though:
Thanks looks like that did the trick.
I'm trying to code an indicator to plot the number of bars since there was a close higher than the current close in the case of an up candle or number of bars since there was a close lower than the current close in the case of a down candle.
I'm pretty new to coding and can't seem to get it to loop and do a count of the number of bars.