[Deleted]  

adding a trailing stop

where would i add a trailing stop

else // go to short position

{

// should it be closed?

if(MorganInd < 0.2)

{

OrderClose(OrderTicket(), OrderLots(), Ask, 3, Violet); // close position

return(0); // exit

}

// check for stop

if(Stop > 0)

{

if(OrderOpenPrice() - Ask > Point*Stop)

{

OrderClose(OrderTicket(), OrderLots(), Ask, 3, Violet); // close position

return(0);

}

}

}

}

}

return(0);

Altern8
23
Altern8  

Slight code modification

Good morning,

Would someone be able to modifi slighty, the 2 attached files for me?

1). e-trailing.ea

To allow a break even setting, so when the trade is in profit it will move the stop loss upto break even point of 12 pips.

2). trade.mq4

To allow a proper stoploss. As the script stands, when it is executed, it places a sellstop, 20pips below the current price, and a stop loss at the current price. I would like to have it place a stop loss 15pips from the sellstop entry place. Not sure if this is possible.

I would be very grateful to those who can help.

Thankyou

A8

Files:
Mohammad Omer
38
Mohammad Omer  

MT4 Broker with dollar index

Does anybody know of an MT4 broker providing Dollar Index except Forex Ltd. ??

Thanx in advance

regards.

kevmcfoster
391
kevmcfoster  

can u make an indicator from this?

Hi,

I found this on marketclub.com...Im not sure if it works, but it does seem useful. Can this information be transformed to an indicator

Strong Downtrend

MINUS 10 POINTS= Last hour close below 5 hour moving average

MINUS 15 POINTS= NEW 3 DAY LOW

MINUS 20 POINTS= LAST PRICE BELOW 20DAY MOVING AVERAGE

MINUS 25 POINTS= NEW 3 WEEK LOW IN RECENT WEEK

MINUS 30 POINTS= NEW 3 MONTH LOW IN CURRENT MONTH

IF TOTAL SCORE=MINUS 100, THEN STRONG DOWNTREND CONFIRMED

PRICE CANT GO UP. IT CAN ONLY GO LOWER===========================

THE OPPOSITE=STRONG UPTREND

Strong UPtrend

PLUS 10 POINTS= Last hour close ABOVE 5 hour moving average

PLUS 15 POINTS= NEW 3 DAY HIGH

PLUS 20 POINTS= LAST PRICE ABOVE 20DAY MOVING AVERAGE

PLUS 25 POINTS= NEW 3 WEEK HIGH IN RECENT WEEK

PLUS 30 POINTS= NEW 3 MONTH HIGH IN CURRENT MONTH

IF TOTAL SCORE=PLUS 100, THEN STRONG UPTREND CONFIRMED

PRICE CANT GO DOWN. IT CAN ONLY GO HIGHER

Thnx

kev

Akuma99
64
Akuma99  

Calculating time

Ok it seems so simple, yet it is doing my head in, all I want to do is take the time value (or bar number) of a verticle line that a user has dragged somewhere on screen then figure out what the value is for let's say 5 bars forward from that and place another vertical line.

At the moment I am getting the time of that line with:

ObjectGet("__timeStart",OBJPROP_TIME1);

which returns something like 1132012800 on a daily chart which doesn't make a lot of sense to me. How do I add a number to get the time value 5 bars ahead of that line?

I have hacked a way that kinda worked on a daily chart, but going down in timeframes things just go awry.

Anyone have an idea?

Farfromaverage
51
Farfromaverage  

CCI-Stochastic Hybrid

I read a good article by Barbara Star that talks about a CCI-Stochastic hybrid indicator. It basically takes the stochastic and substitutes the CCI for price. Can one of the coders here make this for MT4?

Respect,

Steve

Here is the TS code:

{Average(3,(Today's 14-day CCI reading - Lowest 14-day CCI reading (over the past 5 periods)/Highest 14-day

CCI reading (over the past 5 periods) - Lowest 14-day CCI reading (over the past 5 periods))*100)

CCI-Stochastic}

inputs:

CCILength( 14 ),

HighLowPeriod( 5 ),

Smooth( 3 ) ;

variables:

TodayCCI( 0 ),

TodayLowCCI( 0 ),

TodayHighCCI( 0 ),

CCISto( 0 ) ;

TodayCCI = CCI( CCILength ) ;

TodayLowCCI = Lowest( TodayCCI, HighLowPeriod ) ;

TodayHighCCI = Highest( TodayCCI, HighLowPeriod ) ;

if CurrentBar > Smooth + HighLowPeriod then

begin

CCISto = Average((TodayCCI - TodayLowCCI)/(TodayHighCCI - TodayLowCCI), Smooth );

Plot1( CCISto, "CCISto");

end ;

aghast
4
aghast  

this is called arbitrage

Foreverold
315
Foreverold  

Screensaver

Here is a little program for those of you who do not have a screen saver program.

1) Put this file in metatrader/experts/scripts

2) drag onto the screen you want a photo of

3) open folder metatrader/experts/files

you now have a picture of your trade screen

Files:
adria
78
adria  

EA with TD_Points&Line_Auto indicator

I created this EA. It dosen't open any order. I would like that this EA opens

a Buy order when a price crosses the line No.1 from below and opens a Sell

order when a price crosses the line No.2 from above.

Please, help me.

mvert
13
mvert  

ASCtrend + others indicators

Hello has you all,

By grouping together{*By including*} several indicators present on this excellent forum, I built up to myself a small system easy to understand{*include*} which gives me whole satisfaction for the moment.

Indicators:

LSMA in color

ZZ MTF XO A

ZZ4 4 TF XO

ASCtrend1sig

Rules of buy: when ASCtrend1sig gives buy signal to verify that LSMA in color end ZZ MTF XO A end ZZ4 4 TF XO are green.

Rules of sale: when ASCtrend1sig gives a signal of sale to verify that LSMA in color end ZZ MTF XO A end ZZ4 4 TF XO are red.

UT : 4h

I would need your help{*assistant*} and your opinions to be still able to develop this system and make an EA. At first it would be possible to add one limps with message when the indicator the ASCtrendsig gives a signal.

My remerciments for your help{*assistant*}.