Locking floating

 
Need a floating code mq5, for example if floating minus 50 $ will be locked, maybe someone can help
 
Trading applications for MetaTrader 5 to order
Trading applications for MetaTrader 5 to order
  • www.mql5.com
I need a MT4 to Telegram EA. EA to push alerts from indicators etc to telegram channel/group with optional screenshot. Ability for the EA to push my manual trades to telegram. All pairs and time frames. Must include mq4 and/or source file. The following are the things i want to correct in EA: ......When take profit is hit:Only when tp is...
 
Eko Wisma Susanto:
Need a floating code mq5, for example if floating minus 50 $ will be locked, maybe someone can help

lock floating profit = stoploss(or takeprofit) + swap(usually it spends you money every day)

just set the stoploss instead.

if the ticket was closed because sl,find another chance to open ticket again.
 
Feng Guozheng:

lock floating profit = stoploss(or takeprofit) + swap(usually it spends you money every day)

just set the stoploss instead.

if the ticket was closed because sl,find another chance to open ticket again.
Maybe yes ... I use SL but the final result is minus,
 
Eko Wisma Susanto:
Maybe yes ... I use SL but the final result is minus,


when you open a ticket (1lots,buy),then you open a tick(1lots,sell).

the profit is locked,no matter it is minus or not. so not so difficult to understand that in this case,the sell order is equal to a stoploss (sell bellow buy) or takeprofit(sell above buy).

only one thing is different, lets take EURUSD for exam:

Property of EURUSD

means if you buy 1lots of EURUSD,you can get -9.7$(minus means pay to broker) every day

if sell 1lots of EURUSD,you can get 5.08 every day(earn)

but if you lock order ,do the math youself.

i checked all symbol,the sum of the two are negative.

Reason: