Simple pending order from a horizontal line?
-
I'm having problems trying to create a simple pending order at...let's say 50 pips away from a horizontal line.
It seems like something so simple but I can't figure it out...
Can someone please help?
-
The fist thing to do is identifying that line's price level. Is the line manually or automatically plotted on the chart?
-
@l-andorrà Hi my friend..
To be totally honest it's more complicated than this, I created two horizontal lines using the zigzag indicator (Support and Resistance)
I am trying to calculate the difference of these two lines and create a sell pending order one third of the way up from the support line...
I've plugged in the support and resistance lines as variables and used them in a formula (does not work)
I've spent days trying to figure it out and I can see that many people can't seem to get it right on fxdreema (those who are trying to do this) as I've browsed almost every single post on here.
Have you got a solution? (perhaps this post can help others too once resolved)
-
Definitely using variables IS THE solution. Forget using lines. Could you please share the link to your project? I will review the variables part.
-
You can find this number by this formula: Middle Number=Lower Number+0.3×(Higher Number−Lower Number);
Middle number is a variable recording the level in between, 0.3 is the percent (30%) between the high and low from high, so from low would be the same but 0.7 (70%) -
-
@jstap Hi, thank you in advance for your assistance. I'm slightly confused but nevertheless I am trying to figure out what you said...
Please have a look at my shared project. I'm pretty sure the formula is correct. The output result is not. This cannot be?
-
This will show what I mean: https://fxdreema.com/shared/RAYqC4zce
-
@jstap ahhhhhh so you draw lines as per mentioned calculations then base the price (or pending price) on these lines?
-
The lines are just visual, the price is what is used for calculations, and making EA do something. You can save the pending/trade prices into a variable, and then use these to do calculations.
-
@jstap excellent stuff! I will try this later on (ill give an update later) thanks!
-
Hi @l-andorrà @jstap
I managed to plot horizontal lines (as per calculations advised) and use the line's value to open my order. Unfortunately the pending order opens infinite duplicates of that same order...
I tried to use check order count, re-jigged it to have only no trade/order to prevent this yet it's not working.
I have resorted to...using the candle crossing the relevant horizontal line and of course this works.
Nevertheless I got the order to open exactly at the point I needed to...
Thank you both for your help and Sincere dedication!
-
Try a no trade/order block on top.
-
@jstap see, what I believe the problem is...is that I'm trying to re-work and already existing EA. I'll start afresh! (Thanks)
-
Started afresh, all works fine now