50% of profit
-
what can i do for check if price is at 50% of profit target?
"
-
i want to do this :
if current price is at 50% of profit ( example if take profit of trade is 100 and current profit unrealized is 50) do this ...... and ea continue whit other blocks
unfortunately my initial take profit is no fixed pips but is relative at "highest time period" so is no possible use "check distance" or "profit unrealized" because target profit is any tame different for each trade opened, it depend of the range "lowes or highest in defined time ....
i am looking for a function "if current profit is 50% of target profit" but i no see ....
check profit do "if % of blance, of free margin, of ....." but no relative at target profit of trade. are you ideas? thank -
https://fxdreema.com/shared/57O2PjWAc
i wrote on title in a block what i would like to do
-
no one have a idea ?
-
The problem you have is working out the profit that will be reached at TP, if you work with pips it would be easier. For example, TP is 100 pips, then when the trade gets to 50pips in profit you could then reduce lot size.
-
if i knew how many pips will be the range " highest candle time 02.00-08.00 am certainly ...... i could include it like take profit.
but i can't know before 08.01 AM .... EA has to wait every day the end of candle 08.00 am for know it...and work whit this levels .
every day they will be different.
for this reason i put "lowest candle in time 02.00-.08.00" like stop loss and "150% of stop loss" like take profit. i don't know how may pips is it.
so i need a function that calculates this range in pips ..... and blocks "formula", check distance", check stop loss etc don't do it.
question was "what can i do for do it"? what can i do for transform the range "highest/lowest" in a pips number?
but if you answer me that it's impossible ..... it means it can't be done -
If a trade is placed, then in a buy tp-open or sl in a formula, will give you the points (opposite for a sell). So if you divided this by 2 you would get the half way number (alternatively open price+tp price/2 will give you the middle price value)
-
i try it. it work one time only after no work
https://fxdreema.com/shared/4IxyXF09 -
You may want to use solely in loop data, and set two trees so 1 buy and 1 sell. add any shared link here I will look if needed. You may want to use for each order rather than trade.
