molanis.com/forum - Tools for MetaTrader : The place to ask about the best expert advisor builder, expert advisor downloads, and expert advisor programming

AFTER YOU REGISTER SEND US AN EMAIL TO ACTIVATE YOUR ACCOUNT - Before posting:-1- Please read the user guide -2- Try the examples -3- Search in the forum
It is currently Sun May 12, 2024 3:08 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Setting Trailing Stops to Indicators
PostPosted: Fri Dec 07, 2012 11:23 am 
Offline

Joined: Thu Aug 23, 2012 2:00 pm
Posts: 49
Fellow traders....

Can someone pls tell me how to set a trailing stop/SL to the value of an indicator? You must have this one in the bag Rjo...

Thanx


Top
 Profile  
 
 Post subject: Re: Setting Trailing Stops to Indicators
PostPosted: Fri Dec 07, 2012 9:31 pm 
Offline
Site Admin

Joined: Fri Oct 16, 2009 3:40 pm
Posts: 451
Cannot do it in the strategy builder. You need edit the ea code and add a function for that.


Top
 Profile  
 
 Post subject: Re: Setting Trailing Stops to Indicators
PostPosted: Tue Dec 25, 2012 12:32 pm 
Offline

Joined: Sun Jun 19, 2011 9:38 pm
Posts: 270
MikeT wrote:
Can someone pls tell me how to set a trailing stop/SL to the value of an indicator? You must have this one in the bag Rjo...


I only found this post today, so sorry I didn't answer sooner.

This is a bit complex but, as the mods already said, can be done by modfying the CheckTrailingStop code in SB Pro. For a detailed example, Google The8_EA and Ctrl-F CheckTrailingStop in that EA and in your EA for comparison. Have a look at the conditions within that function and you will see what I'm getting at. Consider adding your new condition like && Bid>iCustom(blah blah blah) following TrailingStop>0. This should at least give you a direction to go in.

_________________
I'm not a programmer, but I play one on TV.


Top
 Profile  
 
 Post subject: Re: Setting Trailing Stops to Indicators
PostPosted: Tue Nov 26, 2013 7:25 pm 
Offline

Joined: Wed Jul 18, 2012 11:06 pm
Posts: 78
Assuming I understand what you're saying.. for example, you would like to exit the position when the RSI is 10 points off it's high??

What about:

- creating an indicator that plots the high of the last 20 bars etc for the RSI (custom1)

- then a new indicator of custom1 - 10 (custom2)

- then a SB condition when RSI < custom2

Cheers


Top
 Profile  
 
 Post subject: Re: Setting Trailing Stops to Indicators
PostPosted: Wed Nov 27, 2013 1:44 am 
Offline

Joined: Thu Aug 23, 2012 2:00 pm
Posts: 49
Thanx guys... but I've actually worked this one out.... well, not me but this other guy....

He's done a brilliant job w.r.t.... and all credits to him...

Have a look at this trade manager.... very simple... but powerful....

Compuforex_Trade_Manager.....(Google it)

It might seem a bit complicated at first but once you have a good look at what this guy is on about... it really makes sence...

Seems like a nice guy as-well...

Later


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by Molanis © 2009