MQL4 - automated forex trading   /  

Forum

Login | Register | Language: ru cn en
Become a Signal Provider Right Now

Trailing Stop

Back to topics list To post a new topic, please log in or register
avatar
22
maymay 2007.05.30 08:35
 

I would like to ask about Trailing Stop of MT4.
In MT4, Trailing Stop doesn`t function as long as the position doesn`t gain
as much profit as the number of Trailing Stop ( 15pips, 20pips...) first of all.
Is it possible to make Trailing Stop function from the open price of position ?
(In softwares of FX broker I traded before in , it was possible .)
Is it possible to resolve this problem by EA?

 
Five questions you’ll need to know the answer to if you want to pass the Series 7
If you want to score a high-paying job selling or trading securities in the U.S., you’ll need more than just a good resume. You’ll also need to pass a six-hour, 270-question exam commonly known as the Series 7, or the General Securities Representative Exam (GSRE). The test covers everything you’ll need to know to be a broker, from fairly simple procedural concepts to complex rules surrounding compliance and risk. Passing the Series 7 is particularly critical because you’ll already need to be employed by a FINRA member firm, and you can’t do your job without a license. Failing is an easy way to get fired before ever really getting started. While each exam has different questions, all cover the same general principles. Below are five questions you may see in some iteration, along with the correct answers and an explanation from Brian Marks, managing director at Knopman Financial Training, a New York-based FINRA licensing exam preparation firm. How would you do?
avatar
231
fireflies 2007.05.31 05:56 #
 
if( OrderSelect(ticket,SELECT_BY_TICKET) && OrderCloseTime()==0 ) {
    if( OrderType()==OP_BUY ) {
        OrderModify(OrderTicket(),OrderOpenPrice(),Open[0]-Point*TrailingStop,OrderTakeProfit(),0);
    }
    else if( OrderType()==OP_SELL ) {
        OrderModify(OrderTicket(),OrderOpenPrice(),Open[0]+Point*TrailingStop,OrderTakeProfit(),0);
    }
}
Look at the OrderModify documentation for more explanation and sample.
avatar
22
maymay 2007.05.31 14:38 #
 
fireflies wrote:
if( OrderSelect(ticket,SELECT_BY_TICKET) && OrderCloseTime()==0 ) {
    if( OrderType()==OP_BUY ) {
        OrderModify(OrderTicket(),OrderOpenPrice(),Open[0]-Point*TrailingStop,OrderTakeProfit(),0);
    }
    else if( OrderType()==OP_SELL ) {
        OrderModify(OrderTicket(),OrderOpenPrice(),Open[0]+Point*TrailingStop,OrderTakeProfit(),0);
    }
}
Look at the OrderModify documentation for more explanation and sample.
Thank you firefiles.
But it may be difficult for me to use it because it is a script ,not EA.
I don`t know where to write the number of Trailing Stop and how to edit this script in Meta edit .
I am a beginer.
But I try.
 
avatar
231
fireflies 2007.06.01 05:38 #
 
maymay wrote:

Thank you firefiles.
But it may be difficult for me to use it because it is a script ,not EA.
I don`t know where to write the number of Trailing Stop and how to edit this script in Meta edit .
I am a beginer.
But I try.

It's not a script or EA, just a snippet of codes that may solve your problem.
If you're not yet familiar with programming, MQL4 in particular, you better try to use and tweak some existing EAs.
Look in CodeBase tab above for the repository.

 
avatar
22
maymay 2007.06.01 08:54 #
 
fireflies wrote:
maymay wrote:

Thank you firefiles.
But it may be difficult for me to use it because it is a script ,not EA.
I don`t know where to write the number of Trailing Stop and how to edit this script in Meta edit .
I am a beginer.
But I try.

It's not a script or EA, just a snippet of codes that may solve your problem.
If you're not yet familiar with programming, MQL4 in particular, you better try to use and tweak some existing EAs.
Look in CodeBase tab above for the repository.


Thank you , firefiles.
But I could not find EA which mached to my desire in CodeBase tab.
In fact , I could find such EA in the different forum of MT4.
http://www.forex-tsd.com/metatrader-4/7861-possible-make-trailing-stop-function-open-price-position. html
It may be  precious for many FX traders. 
 
avatar
1
anup1965 2008.12.30 07:38 #
 

The correct thread is

Trailing Stop EA

http://www.forex-tsd.com/expert-advisors-metatrader-4/4844-help-needed-making-perfect-trailing-stop-ea-2.html


Really a very nice trailing stop EA.

 
avatar
1
insanitysnake 2012.12.10 23:15 #
 

Thanks.... Very nice useful script...

My EA very good now... I testing others configs now... Thanks a Lot! 

 
Back to topics list  

To add comments, please log in or register