Limit order at certain % of previous candle
-
Hello! How can I set a limit order at 50% of the total size of the ID1 candle when the price exceeds the high of the ID1 candle?
Or better how to set the customizable percentage of the total size of the ID1 candle where I want the limit buy order to open?
(https://ibb.co/b5nz9xt ; I couldn't attach images in post)
And also how can I modify the expiration time period to be "n" number of candles of the current time frame?
(https://ibb.co/s9ZcB59)Sorry if there are any errors in the text, I'm translating from Spanish. Thanks.
Only a preproject: https://fxdreema.com/shared/qrzbUyBYd
-
@riera9 You can upload images to tha forum by selcting this icon when opening or repplying to a thread:

You can find the total pip size of yesterday's candle this way:

Then you can calculate the percantage you want by creating a Constant ans applying it on that distance.
-
Thanks, the only thing I can think is:
- Obtain the variable with the size value in pips of the id1 candle
- Use a formula block to divide the variable by the value of a constant that represents the desired percentage. Put that value in another variable.
- Buy when the price is equal to the value of that second variable.

But do not know if that works for a buy order and less to do it with a pending order.
-
@riera9 You can get the distance direcly halved by doing this:

Then the second condition block is not correct, because you are getting a pips distance, not a price level.