Forex
Google

Go Back   Forex Trading > Downloads > Expert Advisors - Metatrader 4
Forex Forum Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Register in Forex TSD!
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time).
Click here to register and get more information

Reply
 
LinkBack (1) Thread Tools Display Modes
  1 links from elsewhere to this Post. Click to view. #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, 686 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 03-07-2006, 06:48 PM
WannaBeATrader WannaBeATrader is offline
Member
 
Join Date: Oct 2005
Location: rural usa
Posts: 70
WannaBeATrader is on a distinguished road
Great! Thanks for the quick reply! Now I am wondering what to do with it.
I am not a coder and I guess one needs to attach to an ea to work.
I want to manually open trades with the trailing stop to work.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 03-07-2006, 07:03 PM
Nicholishen's Avatar
Nicholishen Nicholishen is offline
Senior Member
 
Join Date: Dec 2005
Posts: 531
Nicholishen is on a distinguished road
If you want to track manual orders, you'll have to use this version. It will only track one open order per currency at the moment.

Attach the EA and check the box that says "allow live trading". Set the TrailingAct to the level of profit (in pips) that you want to start the trailing stop. Set Trailing step to the amount of pips that you would like to trail.
Attached Files
File Type: mq4 Tight Trailing Stops(manual).mq4 (5.0 KB, 556 views)

Last edited by Nicholishen : 03-07-2006 at 07:05 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 03-07-2006, 11:02 PM
WannaBeATrader WannaBeATrader is offline
Member
 
Join Date: Oct 2005
Location: rural usa
Posts: 70
WannaBeATrader is on a distinguished road
Thank you I will give it a try!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 03-08-2006, 12:18 AM
WannaBeATrader WannaBeATrader is offline
Member
 
Join Date: Oct 2005
Location: rural usa
Posts: 70
WannaBeATrader is on a distinguished road
Question settings

I have attached a screen shot. Are my settings correct? I want a 9 tp and trailing of 6. Should the other settings be true or false? As i mentioned before I am not a coder.
Attached Images
File Type: gif ScreenHunter_1.gif (61.5 KB, 1387 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 03-08-2006, 02:21 PM
WannaBeATrader WannaBeATrader is offline
Member
 
Join Date: Oct 2005
Location: rural usa
Posts: 70
WannaBeATrader is on a distinguished road
Question

I have attached ea to charts, opened only one trade per pair, but I dont think it is working. Any Suggestions.?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 03-08-2006, 06:16 PM
Nicholishen's Avatar
Nicholishen Nicholishen is offline
Senior Member
 
Join Date: Dec 2005
Posts: 531
Nicholishen is on a distinguished road
Quote:
Originally Posted by WannaBeATrader
I have attached a screen shot. Are my settings correct? I want a 9 tp and trailing of 6. Should the other settings be true or false? As i mentioned before I am not a coder.

If you select tight trailing stops to be true it will close the trade after the amount of pips selected in ScalpPips. This is for setting a TP lower than what your broker will allow.

When you want to setup a trailing stop, you will have to change UseTrailing to true. Then the TrailingAct is the activation point where the trailing stop starts to trail. For example, if i want my trailing stop to kick in only after there has been a 10 pip increase in my position, I would set the TrailingAct to 10 (or 10 pips). The TrailingStep (which I should probably rename) is the amount of pips will trail the highest point in the open position. In short, if you want a traditional trailing stop, just set the TrailingAct to 0 and the TrailingStep to the amount you would like to trail by. I hope this helps.

Nic
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 03-08-2006, 08:30 PM
WannaBeATrader WannaBeATrader is offline
Member
 
Join Date: Oct 2005
Location: rural usa
Posts: 70
WannaBeATrader is on a distinguished road
Nic,

You guys are great, thanks for the prompt reply!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 03-09-2006, 12:23 AM
WannaBeATrader WannaBeATrader is offline
Member
 
Join Date: Oct 2005
Location: rural usa
Posts: 70
WannaBeATrader is on a distinguished road
I am currently running the ea, seems to be working, however the modify trade window keeps coming up. I am +11pips at this time have the stop set at 9 so I will see when it comes down if it kicks in. Thank you

Jim
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 05-09-2006, 07:56 AM
zandu zandu is offline
Junior Member
 
Join Date: Oct 2005
Posts: 19
zandu is on a distinguished road
Quote:
Originally Posted by WannaBeATrader
I am currently running the ea, seems to be working, however the modify trade window keeps coming up. I am +11pips at this time have the stop set at 9 so I will see when it comes down if it kicks in. Thank you

Jim
Hi Wanna be a trader , did you get this working well ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

LinkBacks (?)
LinkBack to this Thread: http://www.forex-tsd.com/expert-advisors-metatrader-4/1216-tighter-trailing-stops-stops.html
Posted By For Type Date
פורום - STRATEGY BANK This thread Refback 01-06-2008 11:27 PM

Similar Threads
Thread Thread Starter Forum Replies Last Post
Exit Strategy: Stepping Stops vs. Trailing Stops stu Expert Advisors - Metatrader 4 44 07-01-2008 05:22 PM
Optimal Trailing Stops FlatLine Metatrader 4 3 10-31-2006 06:52 AM
Confused with Trailing Stops baharoth General Discussion 2 05-19-2006 09:37 AM


All times are GMT. The time now is 04:40 AM.