stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

Price Predictions and Probabilities
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=3880
Page 5 of 9
Author:  simplex [ Tue Dec 02, 2014 5:45 pm ]
Post subject:  price predictions

Jayzon » 02 Dec 2014, 19:32 wrote:... we can see the market sort of 3D like. As shown in the attached image, ...
Great visualiziation, Jayzon! :clap: The Chinese Wall built of potential fractals!
Actually I am thinking of an MTF approach to the PTZ / CTZ stuff. Your way of visualization might be very useful for that. So my question: which objects did you use to visualize the PTZ? And would it be possible to post a code snippet, even if your indicator is still under construction?

Cheers, simplex
Author:  Thx [ Tue Dec 02, 2014 11:32 pm ]
Post subject:  price predictions

http://www.forexfactory.com/showthread. ... ost7912030

I certainly not a mathematician, thats why its so puzzling to me ... :arrrg:
But how could we prove (not just assuming) than certain event/ pattern is independent ...

Any thought ?? theory ?? :mrgreen:
Author:  Thx [ Tue Dec 02, 2014 11:49 pm ]
Post subject:  price predictions

Jayzon » Tue Dec 02, 2014 5:32 pm wrote:[quote="[url=http://www.stevehopwoodforex.com/phpBB3 ... 00#p105200]

While working on some fundamental parts of TZ Zones, me and Lowphat noticed that we can see the market sort of 3D like. As shown in the attached image, I believe that when the bottom changes from red to green or vice versa, half of the green and red together is basically a TZ Zone. From here if that is correct, I will be running some pattern calculations on the indicator I'm working on.
Many Thanks Jayzon, ... thats very-very interesting ... :smile:
Author:  Jayzon [ Wed Dec 03, 2014 12:21 am ]
Post subject:  price predictions

So my question: which objects did you use to visualize the PTZ? And would it be possible to post a code snippet, even if your indicator is still under construction?
For the objects, they are all OBJ_TREND lines with the OBJPROP_RAY set to false. I would assume there should be a way to be more efficient, but this way allows me to draw the lines without using buffers.

When drawing across 1 week of data on a 1M TF with 30 HLeft (BarsWidth in my indicator), I get about 1,000 objects for the borders, and the same amount for PTZ line objects.

As far as posting a code snippet, I am considering putting the indicator on here, but I want to talk to Lowphat about it first. Reason being, the core logic was based on some discussions we had. However, below is a small snippet from the indicator that is called to draw a bottom PTZ line.

Thanks for having an interest!

Code: Select all

string name = "3D_Bottom " + (string)BottomCount;
         
if(!ObjectCreate(name, OBJ_TREND, 0, Time[id + BarsWidth], Low[p1], Time[id], Low[p1]))
{
     Print("Error creating 3D_Bottom Object ";
}

else
{
     ObjectSetText(name,(string)MagicIndicatorNumber,0,NULL,clrNONE); 
     ObjectSet(name, OBJPROP_COLOR, Bottom_Color);
     ObjectSet(name, OBJPROP_STYLE, 0);
     ObjectSet(name, OBJPROP_WIDTH, 1); 
     ObjectSet(name, OBJPROP_RAY, false);
}
Author:  Jayzon [ Wed Dec 03, 2014 1:44 am ]
Post subject:  price predictions

Thx » Tue Dec 02, 2014 5:32 pm wrote:http://www.forexfactory.com/showthread. ... ost7912030

I certainly not a mathematician, thats why its so puzzling to me ... :arrrg:
But how could we prove (not just assuming) than certain event/ pattern is independent ...

Any thought ?? theory ?? :mrgreen:
I'm far from being a mathematician myself, but I will give my opinion on this. Independence (probability theory) can mean that two events are independent when the occurrence of one does not affect the probability of the other.

Let us say that when price goes up after a unit of time, it can be considered an event. Now let's say that price going down after a unit of time is an event. From that, we have two events independent of each other.

If we were to count how many times in a row that the price going up event occurred, then compare its count with how much Time occurred, we could possibly find some patterns in there somewhere. These patterns become independent for the price going up event. The same can be done for the price going down event, and it will have its own independent patterns.

Now to determine that a pattern itself is independent, we need to use as much data as available (true accuracy would come from having ALL of the data), then we compute to find a pattern that has only occurred once.

As an example, every time the price goes up, it becomes the new highest occurrence of the amount of times it has ever went up. So that should mean that it will stay an independent pattern until the same pattern completely occurs again. Meaning, every time the price goes up, the pattern that reaches half of the total occurrences of going up will finally stop being independent.

However, the more skewed and different variables that we add to a pattern, the more likely we are to finding new independent patterns. For the things I'm working on, I am more interested in using creative patterns (that occur a lot) that are made out of multiple events, then compare history to find events that seem to follow(happen in the future) as a pattern.

As far as to prove or make a Proof of anything, I'm not ready for that challenge at the moment. :)
Author:  simplex [ Wed Dec 03, 2014 10:38 am ]
Post subject:  price predictions

Thx » 03 Dec 2014, 01:32 wrote:http://www.forexfactory.com/showthread. ... ost7912030

I certainly not a mathematician, thats why its so puzzling to me ... :arrrg:
But how could we prove (not just assuming) than certain event/ pattern is independent ...

Any thought ?? theory ?? :mrgreen:
Quoting wikipedia:

In probability theory, to say that two events are independent (alternatively called statistically independent or stochastically independent) means that the occurrence of one does not affect the probability of the other. Similarly, two random variables are independent if the realization of one does not affect the probability distribution of the other.

see: https://en.wikipedia.org/wiki/Independe ... _theory%29

If you read the article, just skip the math. My view on it:

If you're throwing dice then the result of two subsequent throws may be considered independent of each other - assuming you didn't manipulate the dice ;) Then a third event - the manipulation - would join the game.

Now on the other hand your (imaginary) sister meets a guy, they fall in love and they get married. This may be a rare event, one of low probability, yet it happens every day all over the world to different individuals. Now on their wedding, your best buddy meets this guy's sister, they fall in love, and a year later they get married. A second rare event occured. Are they independent of each other? Certainly not. The probability for the second event to occur has been increased massively by the first event taking place and both of them being invited to the first wedding.

Maybe not the best of all possible examples, but I tried ... :) If anybody can do better, have a go!

Mathematically, the calculation of the probability that two events BOTH will occur depends on the fact whether they're independent of each other or not.

For more detail, probabilistic and independence may be good keywords to ask Mr or Mrs Google.

Cheers, simplex
Author:  simplex [ Wed Dec 03, 2014 11:04 am ]
Post subject:  price predictions

Thanks a lot, Jayzon!
Jayzon » 03 Dec 2014, 02:21 wrote:For the objects, they are all OBJ_TREND lines with the OBJPROP_RAY set to false. I would assume there should be a way to be more efficient, but this way allows me to draw the lines without using buffers.

When drawing across 1 week of data on a 1M TF with 30 HLeft (BarsWidth in my indicator), I get about 1,000 objects for the borders, and the same amount for PTZ line objects.
So I assume that those trendlines all will appear in the object list of the terminal (Ctrl-B) and will remain selectable by double click, so being open for manual manipulation? For trendlines, you might be interested in the sample code provided here:
http://docs.mql4.com/constants/objectco ... /obj_trend
Currently, I am trying to rebuild all my code that draws objects on the chart in this particular manner in order to get more control over the object properties.
Jayzon » 03 Dec 2014, 02:21 wrote:As far as posting a code snippet, I am considering putting the indicator on here, but I want to talk to Lowphat about it first. Reason being, the core logic was based on some discussions we had. However, below is a small snippet from the indicator that is called to draw a bottom PTZ line.
I can understand that. Recently, I coded some special TZ statistics indi based on the ideas of a guy from German FF who lead me to this TZ thing. He asked me to keep it disclosed for a while, and so I do currently. But I believe that sooner or later we will be going to post it!

Cheers, simplex
Author:  Jayzon [ Wed Dec 03, 2014 12:10 pm ]
Post subject:  price predictions

So I assume that those trendlines all will appear in the object list of the terminal (Ctrl-B) and will remain selectable by double click, so being open for manual manipulation? For trendlines, you might be interested in the sample code provided here:
http://docs.mql4.com/constants/objectco ... /obj_trend
Currently, I am trying to rebuild all my code that draws objects on the chart in this particular manner in order to get more control over the object properties.
Yes, they all load into the objects list, and they are currently selectable. Thanks because that reminds me that I might want to set the OBJPROP_SELECTABLE to false by default for my lines. I did add OBJPROP_BACK last night to keep the lines from covering over the price data.

On that link, it does pretty much the same thing as my indicator for drawing a line. The differences are that a couple of OBJPROPs get set that I am not using at the moment, and it was all put into a nice Bool that lets you pass some Parameters for setting the OBJPROPs. Also, I'm not calling ResetLastError() which I may need to call before calling ObjectCreate().

For OBJPROP_RAY_LEFT and OBJPROP_RAY_RIGHT, I only need to set OBJPROP_RAY to false because it seems the same as setting left and right to false. Controlling both sides is a nice feature though that some may need. I'm also calling ObjectSetText to give each object an Indicator Number, so I can remove objects only related to this indicator when deleting them. It works fine for deleting the correct objects when used with another indicator, but for some reason it doesn't work right with using this indicator two times or more with different settings on the same chart. I will probably get that figured out though.
Author:  Lowphat [ Wed Dec 03, 2014 3:09 pm ]
Post subject:  price predictions

I missed the gap going up which looked like it had 2 or 3 stop pushes on that bumpy ride but looking for signs of weakness for a pontential ride down with a first target near the consolidiation unless it pushes past prev consolidation with signs of force
Author:  Thx [ Wed Dec 03, 2014 5:16 pm ]
Post subject:  price predictions

Many Thanks Guys ... :)
All times are UTC Page 5 of 9