BTC USD 81,227.0 Gold USD 3,995.86
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:

Latest Posts

Live Forex Chart

Currency
Rates
EUR / USD
1.12018
USD / JPY
156.865
GBP / USD
1.33760
USD / CHF
0.82508
USD / CAD
1.40041
EUR / JPY
175.716
AUD / USD
0.70300
Back
Top
Log in Register