Hi Eugene and KGo
I never said, but I am using wealth-lab pro v6.9.
@KGo
QUOTE:
"Code1 and Code2 debug should not be the same. Therefore you did not recompile the code after editing. FIX: Do not press "Go" in the data panel after editing . It does not recompile. Press "Run the Strategy" on the code editing tab. That will compile and run."
I have been only using the "Run the strategy" button. The debug output is the same, but the trades are different. Only two occur with Code1. I have not been pressing "Go" in the data panel.
I am using starting capital mode of 5000 with 5000 fixed dollar purchases. Margin is 1:1. Without making the adjustments (just to understand why what I currently have doesn't work) I thought the first trade using 5K would still take place regardless since I am starting with 5K?
@Eugene .. I did not modify the loop. I do get the lesson you are teaching about being careful about the lookback period and not using results that do not have an adequate look back period, but I see my question as much more basic. I am maybe being dense and I've repeated, but even with your comments about the lookback period I still just don't understand the differences in that initial buy results from this one change.
CODE:
Please log in to see this code.
vs
CODE:
Please log in to see this code.
Especially after looking at the debug results .. which @KGo is telling me is not valid and that I didn't compile. I don't get that, as I have only been using the run strategy button and the trade results table I show shows a difference. But KGo is right in that it doesn't match. I am looking at each line of code independently as I would with any C code but maybe that is throwing me off in this case. Is the whole iteration invalid if any data in that iteration is invalid?
There is no indicator warning about possible unreliable results so I have to be able to recognize that on my own. Being new, I am bound to overlook something or be unaware of some code that I am using that I unknowingly shouldn't be trusting but will. Keep in mind this is especially the case considering I did not write Code1. This code came directly from the "New Strategy From Rules" option wealth-lab pro provides which I thought would be a safe way to learn some basic in programming before moving to something more complex.
I'll just keep at it. Close the windows, take a few days off from this and then try again.
If not me, maybe this post can help another novice but in any case you guy's responses and attempts at helping me have been awesome.
Thanks