converting seial data to variable data

Questions about MultiCharts and user contributed studies.
wall richard
Posts: 60
Joined: 28 Dec 2007
Has thanked: 9 times
Been thanked: 1 time

converting seial data to variable data

Postby wall richard » 11 Jun 2012

Hello,

Is there a method or code to easily convert simple numeric array data to numeric variable data?

Richard

bowlesj3
Posts: 1977
Joined: 21 Jul 2007
Has thanked: 155 times
Been thanked: 395 times

Re: converting seial data to variable data

Postby bowlesj3 » 11 Jun 2012

Not sure what you mean? Are you talking about putting an array of 10 elements into 10 different variables? Maybe an example of the variable data you are referring to is needed?

wall richard
Posts: 60
Joined: 28 Dec 2007
Has thanked: 9 times
Been thanked: 1 time

Re: converting seial data to variable data

Postby wall richard » 11 Jun 2012

Yes, as your example, a one dimensional array with 10 elements ===> 10 bar variable such as Value1[0] ..... Value1[9]. It's trivial to convert variable values into an array. But, is it possible to do the reverse?

Can array data be used in an indicator like a linear regression or does it have to be converted to a variable first?

Richard

bowlesj3
Posts: 1977
Joined: 21 Jul 2007
Has thanked: 155 times
Been thanked: 395 times

Re: converting seial data to variable data

Postby bowlesj3 » 11 Jun 2012

I understand now. I suspect not because the underlying tables of serial data are in theory historic data and thus you can not change history in today's world (gee if I could do that it would be great since I could redo all my decisions and be incredibly rich). If you figure out how to do that please let me know :-)

Making a copy of what happened historically like you say is "trivial" and that would be like making a copy of a film of the great stock market crash (can't get rich from that) :-(

Of course they could have made the compiler so it would do whatever they dam well want but that would be a "cheating compiler" and cheating in the long run gives us a lot of problems so it seems that they wisely decided against that.

Now, having said all that I thought of something. If you have an array loaded on currentbar=1 from lets say a csv file, you could put that data into serial data as each new bar completed by updating WhateverVar[0] each time. In this case your array would be a prediction of the future. Probably not what you had in mind however.

wall richard
Posts: 60
Joined: 28 Dec 2007
Has thanked: 9 times
Been thanked: 1 time

Re: converting seial data to variable data

Postby wall richard » 11 Jun 2012

I agree that we can never peak even a little bit into the future. All smoothing functions introduce phase lag. Most think amplitude (price) is the most important of all trading data. It's not. Phase is the most important. Phase lag is almost always responsible in trading losses. Both in entry and exit.

About the best we can do is nullify phase lag so our indicators and charting data have zero phase lag. One of the best ways is to convert the data to an array, manipulate the data in the array and then plot the near zero lagged data. Unfortunately, it's difficult to apply array data to most indicators. Hence, this topic about conversion from arrays to variables.

bowlesj3
Posts: 1977
Joined: 21 Jul 2007
Has thanked: 155 times
Been thanked: 395 times

Re: converting seial data to variable data

Postby bowlesj3 » 12 Jun 2012

Yes strategy is an interesting topic. Any touch on the topic reminds me of all the great traders and how everyone is different. In one of the better books I have read John Hayden speaks of the technical traders and the fundamental people. He says basically they swear up and down that their system is the best. Then he follows up with "of course they are both correct" which is probably one of the smartest things I have heard anyone involved in the market say. In another great book the author says "there must be 1,000 good trading systems". I think it is impossible for anyone on the planet to prove their system is better than others because they would be long dead before they were able to gather the data required to statistically prove that. I think trader success is highly dependent on how efficient they become at the strategy they have selected. It is and endless topic and highly subjective and I think this is probably why most avoid it and just simply respect the other person's choices to do it whatever way they see as best for them.


Return to “MultiCharts”