Home
Search Forums
Keywords:
Search Titles Only
User Name:
Exact Match
Show Results As:
Advanced Options
Reply
 
Thread Tools Search this Thread
  #61  
Old Nov 2, 2009 12:26pm
last boy scout
 
Member Since Apr 2008
1 Vouchers  46 Posts
Default

we know that x2=x1+y1 and x>y

For real,rational, whole (these are just easier to start with) numbers, lowest value for x is 2 and for y is 1.

If we take that y2=(x1+y1)-1, the first ten values for x and y are:

x: 2,3,5,9,17,33,65,129,257,513
y: 1,2,4,8,16,32,64,128,256,512

The bold ones are the ones that we will use as position size numbers.

The series 2,2,4,8,16,32,64,128,256,512... gives an interesting result, possible generating function , amongst other things.
Attached Files
File Type: pdf Wolfram_Alpha-2248163264128256512.pdf (225.1 KB, 12 views)
Reply With Quote
  #62  
Old Nov 3, 2009 2:57pm
Member
 
Member Since Mar 2009
Default

what do you think, will this work?



let say if abs(e1-x) = 180 :
if we manage to exit @ e5 we're shifting a reward/risk 80:180 into 200:180
if we manage to exit @ e10 we're shifting a reward/risk 1:1 into 5:1

because e1-x : e2-e1 = 180:20 a random e1 would yield breakeven vs loss ratio around 9:1 (we dont know if its gonna win or not yet)

the crucial part is the e2 entry placement as this entry make the position combination to have the most narrow SL as seen on table, but anyway if we already onto e2, basically we already at 0 risk.

And to make a little room to breath for this new position, we can sacrifice a bit of position size on the 2nd entry. To to achieve breakeven SL we need

ax=(b-a)*y

a positive pips on initial entry x lot
b pips point where we want to add y lot

so from e1 - e2 assuming it is 0 to 100 pips, if I want the combination SL to be at 30 pips from e1 (or 70 pips SL on e2, assuming allowable price retracement is 61.8 pips on every 100 pips move)

x = 1 lot and y = 30/70X

but with this reduced lot strategy, this pyramid wont be an infinite one.

But this is solved by twoblink.... (got to admit you are good )
using the recursive infinite pyramid, problem above is history.



And lastly, can anyone please point me or tutor me to place where I can learn mql programming or searchable syntax & variable library, specifically on order management? like get all open order prices, and move all open order stops...
Reply With Quote
  #63  
Old Nov 4, 2009 1:51am
last boy scout
 
Member Since Apr 2008
1 Vouchers  46 Posts
Default

I'm sorry, this is not what I'm looking for, there must not be any room for tweaking or misinterpretations, the goal is the most efficient equation.

On the other hand, I'm glad that reading this thread gave you ideas that you think will work for you.

as for mql/order managemet - google is your friend
http://docs.mql4.com/trading/OrderSend (and other types)



I've figured out how to get limit of a function, the syntax is lim x/|x| as x->infinity

and the result is
Reply With Quote
  #64  
Old Nov 4, 2009 5:18am
last boy scout
 
Member Since Apr 2008
1 Vouchers  46 Posts
Default saddle point

An easy explanation of saddle point:




and few notes regarding our situation:



I almost drowned in those damn hessian... things.




But we'll need more than one. I've started reading this:

An Efficient and Stable Method for Computing Multiple Saddle Points with Symmetries by Zhi-qiang Wang , Jianxin Zhou
http://citeseerx.ist.psu.edu/viewdoc...10.1.1.15.5695
(you must click on icon below word cached)

Abstratct:
In this paper, an efficient and stable numerical algorithm for computing multiple saddle points with symmetries is developed by modifying the local minimax method established in [12, 13]. First an invariant space is defined in a more general sense and a Principle of Invariant Criticality is proved for the generalization. Then the orthogonal projection operator to the invariant space is used both to preserve the invariance and to reduce computational error across iterations. Simple averaging formulas are used to find the orthogonal projection operators. Numerical computations of examples with various symmetries, of which some can and others cannot be characterized by a compact group of linear isomorphisms, are carried out to confirm the theory and to illustrate applications. The mathematical features of various symmetries demonstrated in these examples fall into two categories: nodal solutions of saddle point type with large Morse indices and non-radial positive solutions via symmetry breaking in radially symmetric elliptic problems. The new numerical algorithm generates these rather unstable solutions in a stable way. The existence of many unstable solutions and their behavior found in this paper remain to be investigated.
Reply With Quote
  #65  
Old Nov 4, 2009 5:35am
last boy scout
 
Member Since Apr 2008
1 Vouchers  46 Posts
Default multiple saddle points

Analytic Combinatorics By Philippe Flajolet, Robert Sedgewick,

saddle point analysis - page 589.

multiple saddle points formula - page 601.

http://books.google.com/books?id=0h-...points&f=false
Reply With Quote
  #66  
Old Nov 4, 2009 5:37am
last boy scout
 
Member Since Apr 2008
1 Vouchers  46 Posts
Default

and an amusing real life example from yahoo answers

How do you find the saddle point of a multi-variable function?
f(x, y) = 6x^2 - 2x^3 + 3y^2 + 6xy

I figured out that the critical points are (0,0) and (1, -1) and that:

fx = 12x - 6x^2 + 6y
fy = 6y + 6x
fxx = 12 - 12x
fyy = 6
fxy = 0

Using the Second Derivative test:

if (12 - 12x)(6) - 0^2 < 0 then f(x, y) at (x, y) is a saddle point, but at the point (1, -1) the test yields:

(12 - 12)(6) - 0 = 0

However, my text book says this is a saddle point. How can I prove this is a saddle point when the second derivative test was inconclusive?


Your error is:

fxy = 6 not 0

that gives

D = (12 - 12x)(6) - 6² < 0

And is therefore a saddle point.

But to answer you question in general when the second partial test is indecisive then you need to look at the determinant of the matrix of 3rd order derivatives and make a decision based on that. If that is indecisive then you move on to the matrix of 4th order derivatives. But examples of that are not usually found in introductory classes.
Reply With Quote
  #67  
Old Nov 4, 2009 5:49am
last boy scout
 
Member Since Apr 2008
1 Vouchers  46 Posts
Default

Optical Design & Engineering


Saddle points reveal essential properties of the merit-function landscape

Florian Bociort and Maarten van Turnhout


Unlike other global optimization methods, a new approach transforms local minima into saddle points to aid optical-system design.
24 November 2008, SPIE Newsroom. DOI: 10.1117/2.1200811.1352



In various areas of science and engineering, minimization of highly nonlinear functions with many variables is important. For instance, in optical-system design deviations from a given set of targets must be reduced by as much as possible within certain tolerances. Such a system is generally modeled as a point in multidimensional space in which the variables are constructional system parameters. Merit functions, i.e., functions that contain in a single number the defects of a specific configuration, typically have many local minima. Finding deep local minima, if possible the global minimum, is an essential part of the design process.

In the past decades, significant progress in the field of global optimization has led to development of powerful software packages for application to many design problems, including optics. Nevertheless, avoiding poor-quality local minima remains very challenging, particularly if the system is characterized by a large number of variables. The novel method of saddle-point construction (SPC) changes the dimensionality of the problem.1 It can also be used successfully for very complex systems with many variables and constraints (e.g., in designing lithographic objectives2) because it enables generation of new system shapes with only a small number of local optimizations.



Figure 1. Derivation of two local minima with N+2 surfaces from a local minimum with N surfaces via a null-element saddle point (NESP).

In lens design, SPC is achieved by inserting lenses into the system. The approach works with any type of mirror or lens surface, but for simplicity we only discuss spherical surfaces. We start with an optimized system with N surfaces. Any optical merit function can be used, e.g., those based on transverse aberrations or wavefront distortions. In the existing system, i.e., a local minimum with N surfaces, we insert a meniscus lens of zero thickness and equal curvatures. This ‘null element’ disappears physically and affects neither the light path nor the system's merit function. However, if the new system is slightly modified, the new lens enables the merit function to decrease. There are two new variables, i.e., the two surface curvatures. For some specific curvature values the local minimum is transformed into a ‘saddle point’ in the variable space of increased dimensionality.1



Figure 2. NESP characterized, at the position of insertion, by three surfaces with equal curvatures and with two zero distances. For clarity, the two zero distances are shown as small widths. The path of any ray (continuous line) is left unchanged by the null element.

An intuitive illustration of SPC is shown in Figure 1. The starting system is minimum for all variables. For simplicity, only one variable is shown (in red) in the upper left of Figure 1. When the null element is added, new ‘downward’ (green) and ‘upward’ directions (not shown) appear in the new variable space (with dimension increased by 2). In the downward direction the new system shows a maximum and is therefore a ‘null-element’ saddle point (NESP). Although we typically have many more than two variables, the NESP resembles a 2D horse saddle. If we choose and optimize two points close to the NESP but on opposite sides of the saddle, the optimizations ‘roll down’ from the NESP and arrive at two distinct local minima. (The optimization variables are those of the initial local minimum and the two null-element curvatures.)

In general, if the insertion position and the glass of the null element are arbitrary, the curvature of the meniscus turning the system into an NESP can be computed numerically.3 An animation4 shows the system going through the phases of Figure 1. However, a simple and efficient version of the method occurs when the null element is inserted in contact with (i.e., at zero axial distance from) an existing surface—the reference surface—in the original local minimum. The type of glass of the null element should also be the same as that of the reference surface. In this special case, we can show that we obtain an NESP when the two curvatures of the null element (the second lens in Figure 2) are equal to that of the reference surface.1 The conditions for insertion position and glass type are not as restrictive as they might seem, however. Once the minima on either side of the NESP have been obtained, the distances between the surfaces and the glass of the null-element lens can be changed as desired. SPC can be used in reverse order to remove lenses in a systematic way.

This new tool can increase design productivity. When a lens is inserted as usual, one new system shape results after optimization. However, when a lens is inserted with SPC, two distinct system shapes result, and for further design one can choose the optimal configuration. By inserting and (if required) removing lenses, new system shapes can be obtained very rapidly. The theory behind SPC is based on mathematical concepts which are still new in optical design, but the practical implementation is very easy, and the method can be fully integrated with all other traditional design tools.5,6

In principle, SPC will also be applicable in other optimization problems satisfying certain mathematical conditions (i.e., the existence of two independent transformations of a null element that leave the merit function unchanged1), e.g., in thin-film optimization. However, in applications other than lens design more research is needed to investigate the practical use of SPC. Work is presently being done to analyze SPC in a broader context, independent of lens design.
Florian Bociort, Maarten van Turnhout
Delft University of Technology
Delft, The Netherlands
http://wwwoptica.tn.tudelft.nl/users.../networks.html
References:
1. F. Bociort, M. van Turnhout, Generating saddle points in the merit function landscape of optical systems, Proc. SPIE 5962, pp. 59620S1-59620S8, 2005. doi:10.1117/12.624867
2. O. Marinescu, F. Bociort, Designing lithographic objectives by constructing saddle points, Proc. SPIE 6342, pp. 63420L, 2006. doi:10.1117/12.692250
3. F. Bociort, M. van Turnhout, Looking for order in the optical design landscape, Proc. SPIE 6288, pp. 628806, 2006. doi:10.1117/12.681541
4. Saddle-point construction for the general case. Credit: F. Bociort, M. van Turnhout, and P. van Grol, Delft University of Technology. http://spie.org/documents/newsroom/v...eAnimation.gif
5. F. Bociort, M. van Turnhout, O. Marinescu, Practical guide to saddle-point construction in lens design, Proc. SPIE 6667, pp. 666708, 2007. doi:10.1117/12.732477
6. Guide to saddle-point construction. Accessed 29 October 2008. http://www.optica.tn.tudelft.nl/user.../SPC_guide.zip

source: SPIE
http://spie.org/x31524.xml?ArticleID=x31524
Reply With Quote
  #68  
Old Nov 6, 2009 6:16am
last boy scout
 
Member Since Apr 2008
1 Vouchers  46 Posts
Default The process - no, not the one by Kafka

stupid, stupid, stupid, stupid

Why haven't I figured this out before?

It hit me in the elevator. And I was thinking about completely different matter. A few weeks ago, during the reconstruction of one of Belgrade's streets, they were changing the tram tracks near the old Kalemegdan fortress. The workers uncovered walls of the roman Belgrade (Singidunum), specifically, part of military camp of the IVth Flavia Felix legion (in the movie gladiator, Russell Crowe is the commander of that legion - offtopic: The modern version of roman epic figure, Coriolan - Gaius Marcius Coriolanus will be filmed in Belgrade in 2010, based on Shakespeare's tragedy, with Ralph Fiennes and Gerard Butler). That legion guarded the frontier of the roman empire in the Balkans, and the city was situated on the hill, on the confluence of Sava and Danube rivers. The roman word for that frontier - limes, got me visualizing that line from North to Black sea,a thin line, with few dots (legions) along the way. I started to think is there a function that could describe that line.

An then it hit me. It was all said before, but not in one sentence. The equation is a function, and by examining the flow and properties of a function, we can get all that we need. I've solved hundreds of problems like this in high school.

I don't know what problems you solved, but given the equation of a function, we had to find its definability, concavity, convexity, saddle points (prevojne tačke funkcije), asymptotes, monotonicity, inflection points (minimum/maksimum funkcije) and in the end draw a graph of a function.

Saddle point is our entry point, inflection point is a stop loss point, that's why we need first and second derivative, that's why the integration is so important, that's how you can get all five variables if you only have one.
I even posted the picture of saddle point and minimum in previous post and didn't figured it out immediately.

You find the properties of a function, have point A and lot X at the start, find the B and SL for B using first and second derivative, then integrate that and get SL for A, find out C, rename it as A2 and start the process again.


I'm not entirely sure about the correct way to calculate point C, but I'm certain that it has something to do with the limit of the series from point A to point B. This requires further thinking.

This is what I said in one of previous posts about the necessity of understanding the logic behind the equation and that equation alone is not enough. Try doing all above for some simple function like y=2x+1, but without computer, pen or paper. After a while, the process should seem natural and you can move to more complex functions.
Reply With Quote
  #69  
Old Nov 6, 2009 8:54am
mathematician's Avatar
Me and the trend are best friends!
 
Member Since Feb 2007
4 Vouchers  346 Posts
Default

How do you know that profit is maximized and risk is minimized if you don't know how prices move in general? Or do you know how prices move?
__________________
"Experience is expensive, but it's money well spent." --me
Reply With Quote
  #70  
Old Nov 6, 2009 12:05pm
last boy scout
 
Member Since Apr 2008
1 Vouchers  46 Posts
Default

Read the thread again,I do not need to know what the market is doing. This is iff scenario (iff/akko - if and only if/ako i samo ako). If and only if the price reaches the required level, the second and all subsequent transactions are activated. This is MM discussion, I do not care what the governors said, how many jobs were lost or what's the actual interest rate. It's amusing to read but totally irrelevant.
Reply With Quote
  #71  
Old Nov 7, 2009 2:59am
twoblink's Avatar
Member
 
Member Since May 2006
8 Vouchers  789 Posts
Default

Because we can calculate every scenario and calculate the risk and reward of every position.. A divergent result will give you an infinity (aka non-answer) a convergent result will give you a maximized reward, or minimized risk. A combo of intersection will give you a saddlepoint and thus a mini-max point.
__________________
google: "Trend and Trendfans"
Reply With Quote
  #72  
Old Nov 8, 2009 6:17am
mathematician's Avatar
Me and the trend are best friends!
 
Member Since Feb 2007
4 Vouchers  346 Posts
Default

I know the ephemeral point C is the short side of phi (at least that's what it seems from the diagram), but is it also this?

C = (Ax + By)/(x+y)

In other words, the weighted average of the two positions (weighted by number of units)?
__________________
"Experience is expensive, but it's money well spent." --me

Last edited by mathematician, Nov 8, 2009 6:32am
Reply With Quote
  #73  
Old Nov 9, 2009 2:39am
twoblink's Avatar
Member
 
Member Since May 2006
8 Vouchers  789 Posts
Default

C is the long side of phi.. yes, it is or can be represented as the average of the positions. If C were the short side, then you wouldn't be able to pyramid..
__________________
google: "Trend and Trendfans"
Reply With Quote
  #74  
Old Nov 9, 2009 3:59am
mathematician's Avatar
Me and the trend are best friends!
 
Member Since Feb 2007
4 Vouchers  346 Posts
Default

Ok. Now in your post with the diagram http://www.forexfactory.com/showpost...1&postcount=18

That's showing a short trade, right?
__________________
"Experience is expensive, but it's money well spent." --me
Reply With Quote
  #75  
Old Nov 9, 2009 4:03am
mathematician's Avatar
Me and the trend are best friends!
 
Member Since Feb 2007
4 Vouchers  346 Posts
Default

If I understand this correctly, point C is the 38.2% Fibonacci level between A and B, and the stop loss is the 61.8% Fibo. Right?

(I guess I could have said the 38.2 and 61.8 backwards depending on if you measure it from A to B or from B to A...)
__________________
"Experience is expensive, but it's money well spent." --me
Reply With Quote
Reply

1 Trader Viewing This Thread (0 are members)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads
Thread Thread Starter Forum Replies Last Post
Risk Vs. Reward marolam Trading Discussion 4 Sep 19, 2009 1:50pm
Risk Reward TheMonk Rookie Discussion 6 Nov 13, 2008 4:17am
Risk Reward MatrixGunn Programming Discussion 0 Jun 10, 2008 9:56pm
Risk:Reward vs. 2% fourth Trading Discussion 15 Oct 31, 2007 4:39am
Risk Reward Ratio and Account Risk aparsai Trading Discussion 30 Feb 22, 2007 11:37am