View Single Post
  #1 (permalink)  
Old 03-07-2006, 03:40 PM
Nicholishen's Avatar
Nicholishen Nicholishen is offline
Senior Member
 
Join Date: Dec 2005
Posts: 531
Nicholishen is on a distinguished road
Tighter Trailing Stops && Stops

Most of the brokers out there won't let us scalpers use tight StopLosses or Modify the orders with a tight Trailing Stop. Attached is some code to facilitate this function.

To use the TTS, you’ll need the following setup.
1. A global variable setup with
a. extern int TrailingAct
b. extern int TrailingStep
c. int TrailingPrice

2. Insert the functions into your code.

3. Make sure that you reset the global variable TrailingPrice to 0 after you close your trades. I have a function that calculates current orders and if there are 0 then the first line after it is to reset TrailingPrice then OpenOrders().

note: this version won't modify the order if the trailing stop is within 8 pips of the current price, but will still close according to the TS.
Attached Files
File Type: mq4 Tight Trailing Stops.mq4 (4.7 KB, 735 views)
Reply With Quote