Take profit question

 

Hi!

From what I understand, the take profit is use to automatic close the deal when the price reach to the take profit price. but during strategy testing the deal is not close even the price is raise over x times of the take profit price. All my deal was closed at the end of the strategy testing. Why take profit doesn't help me to close the deal? and I need to manually code it to close the deal when it reach to my take profit price? but how to code??

Many thanks

 
ClipWork:

Hi!

From what I understand, the take profit is use to automatic close the deal when the price reach to the take profit price. but during strategy testing the deal is not close even the price is raise over x times of the take profit price. All my deal was closed at the end of the strategy testing. Why take profit doesn't help me to close the deal? and I need to manually code it to close the deal when it reach to my take profit price? but how to code??

Many thanks

I highlight your words/sentences. What do you mean by "... even the price is raise over x times of the take profit price ..." ?. Is it "the Bid price is above the Take Profit level price for buy position" and " "the Ask price is below the Take Profit level price for sell position" ?.
Documentation on MQL5: Standard Constants, Enumerations and Structures / Trade Constants / Order Properties
  • www.mql5.com
Standard Constants, Enumerations and Structures / Trade Constants / Order Properties - Documentation on MQL5
 
onewithzachy:
I highlight your words/sentences. What do you mean by "... even the price is raise over x times of the take profit price ..." ?. Is it "the Bid price is above the Take Profit level price for buy position" and " "the Ask price is below the Take Profit level price for sell position" ?.

Yes! 

 
I guess you use hidden takeprofit, right? Because if you use takeprofit as value, I'am sure when price touch takeprofit value the deal will close. May be there are some wrong about point value.
Documentation on MQL5: Standard Constants, Enumerations and Structures / Environment State / Symbol Properties
  • www.mql5.com
Standard Constants, Enumerations and Structures / Environment State / Symbol Properties - Documentation on MQL5