Forex



Go Back   Forex Trading > Downloads > Expert Advisors - Metatrader 4
Forex Forum Register More recent Calendar Advertising Others Help






Register
Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.

From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.

Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
  • Elite Section
    Get access to private discussions, specialized support, indicators and trading systems reported every week.
  • Advanced Elite Section
    For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
See more

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 03-07-2006, 04:40 PM
Nicholishen's Avatar
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, 1333 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #2 (permalink)  
Old 03-07-2006, 07:48 PM
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #3 (permalink)  
Old 03-07-2006, 08:03 PM
Nicholishen's Avatar
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, 1110 views)

Last edited by Nicholishen; 03-07-2006 at 08:05 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #4 (permalink)  
Old 03-08-2006, 12:02 AM
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #5 (permalink)  
Old 03-08-2006, 01:18 AM
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, 3156 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #6 (permalink)  
Old 03-08-2006, 03:21 PM
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #7 (permalink)  
Old 03-08-2006, 07:16 PM
Nicholishen's Avatar
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #8 (permalink)  
Old 03-08-2006, 09:30 PM
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #9 (permalink)  
Old 03-09-2006, 01:23 AM
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #10 (permalink)  
Old 05-09-2006, 08:56 AM
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
Reply

Bookmarks

Tags
trailing step, tight trailing stop, Tight Trailing Stops, Trailing Stops


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

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

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


All times are GMT. The time now is 01:08 AM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.