BTC USD 81,457.9 Gold USD 4,378.12
Time now: Jun 1, 12:00 AM

trailing stop....5pip

MA REBORN

Banned
Messages
2,034
Joined
Jul 9, 2010
Messages
2,034
Reaction score
95
Points
30
mohon bantuan sesiapa ada trailing stop yg leh set 5pip atau 3pip...
broker set 15 pip:((:((
satu cara utk elak profit berkurang bila trade reqoute...atau ofline:mad::mad:

:)paid:)paid
 
kalau tak silap aku pernah donlod kat trading style thread lukpayat 1000pips cer cari sana. kalau takder cari 3000pip. malas plak nak cari kat komputer aku ni. tapi dia guna ea
 
mohon bantuan sesiapa ada trailing stop yg leh set 5pip atau 3pip...
broker set 15 pip:((:((
satu cara utk elak profit berkurang bila trade reqoute...atau ofline:mad::mad:

:)paid:)paid

ooo..baru den tau leh ubah..
ingatkan ikot apa yg ade kat mt4 je..:)):))
 
mohon bantuan sesiapa ada trailing stop yg leh set 5pip atau 3pip...
broker set 15 pip:((:((
satu cara utk elak profit berkurang bila trade reqoute...atau ofline:mad::mad:

:)paid:)paid

aii..dah abis usaha ke blum?..ngko kan master besar..jgnla nanges2 :eek: :eek:

//+------------------------------------------------------------------+
//| Trailing Stop 5.mq4 |
//| Copyright © 2004, MetaQuotes Software Corp. |
//| http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2004, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net"

//+------------------------------------------------------------------+
//| expert initialization function |
//+------------------------------------------------------------------+
extern double TakeProfit = 0;
extern double StopLoss = 15;
extern double Lots = 1;
extern double TrailingStop = 5;

int init()
{
//---- TODO: Add your code here.

//----
return(0);
**
//+------------------------------------------------------------------+
//| expert deinitialization function |
//+------------------------------------------------------------------+
int pos3pre = 1;
int pos4cur = 0;
int cnt = 0;
int openpozprice = 0;
int mode = 0;
int deinit()
{
//---- TODO: Add your code here.

//----
return(0);
**
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start()
{
for (int i = 0; i < OrdersTotal(); i++) {
OrderSelect(i, SELECT_BY_POS, MODE_TRADES);

if (OrderType() == OP_BUY) {
//if (Bid > (OrderValue(cnt,VAL_OPENPRICE) + TrailingStop * Point)) {
// OrderClose(OrderTicket(), OrderLots(), Bid, 3, Violet);
// break;
//**
if (Bid - OrderOpenPrice() > TrailingStop * MarketInfo(OrderSymbol(), MODE_POINT)) {
if (OrderStopLoss() < Bid - TrailingStop * MarketInfo(OrderSymbol(), MODE_POINT)) {
OrderModify(OrderTicket(), OrderOpenPrice(), Bid - TrailingStop * MarketInfo(OrderSymbol(), MODE_POINT), OrderTakeProfit(), Red);
**
**
** else if (OrderType() == OP_SELL) {
if (OrderOpenPrice() - Ask > TrailingStop * MarketInfo(OrderSymbol(), MODE_POINT)) {
if ((OrderStopLoss() > Ask + TrailingStop * MarketInfo(OrderSymbol(), MODE_POINT)) ||
(OrderStopLoss() == 0)) {
OrderModify(OrderTicket(), OrderOpenPrice(),
Ask + TrailingStop * MarketInfo(OrderSymbol(), MODE_POINT), OrderTakeProfit(), Red);
**
**
**
**

//---- TODO: Add your code here.

//----
return(0);
**
//+------------------------------------------------------------------+





cer try :)) :))
 
Last edited:

Live Forex Chart

Currency
Rates
EUR / USD
1.14790
USD / JPY
156.877
GBP / USD
1.33950
USD / CHF
0.82250
USD / CAD
1.39985
EUR / JPY
180.080
AUD / USD
0.71320
Back
Top
Log in Register