Set take profit, without ctrade function

 

Hello guys,

I'm kinda new here. I created my first bot but i d0on't know how to code the take profit function.

I just wanna set a condition that if order is triggered, take profit is 300 points(both long and short).

I hope you can help me,

Thanks!

Extract profit down to the last pip
Extract profit down to the last pip
  • www.mql5.com
The article describes an attempt to combine theory with practice in the algorithmic trading field. Most of discussions concerning the creation of Trading Systems is connected with the use of historic bars and various indicators applied thereon. This is the most well covered field and thus we will not consider it. Bars represent a very artificial entity; therefore we will work with something closer to proto-data, namely the price ticks.