Thread: How to code?
View Single Post
  #789 (permalink)  
Old 04-01-2008, 07:09 AM
hiachiever hiachiever is offline
Member
 
Join Date: Jan 2006
Posts: 56
hiachiever is on a distinguished road
Quote:
Originally Posted by jturns23 View Post
Could anyone tell how how to hide stoplosses and trailing stops in an EA? (I don't like the idea of brokers seeing my stoplosses or trailing stops, it's like a target for them). Thanks.
Simple in your code you define a stopvalue and a target value.
Then after you place a trade obtain the price that you entered the trade at, and then with each new each tick check to see if either your stop or your target has been hit.

If has been hit then have the EA execute the OrderClose function.

Personally, I still have a stop that the broker can see though it is set a long way from the price action 50-100 pips. In this way if the terminal goes down for some reason, you are at least protected against any sudden moves.

Cheers,
Hiachiever
Reply With Quote