How to code? - page 258

 

Thank you Drave, many thanks!

 
 

Indicator settings

Hello...

I need some help with my indi setting...when im putting a minus -10 in the indi it shows a perfect chart but it come 10bars later...haw we can slove this problem ??

//

if (calculateValue || timeFrame==Period())

{

for(i=limit; i>=0; i--)

{

hma1 = iHma(iMA(NULL,0,1,-20,MODE_SMA,Price,i),Length,i,0);

hma2 = iHma(hma1 ,Length,i,2);

hma = 2.0*hma1-hma2;

//
 

Xard

Hello..

Xarad have posted this code for the SSL indi...

switch ( Period() )

{

case 1: Lb = Lb*240;break;

case 5: Lb = Lb*48;break;

case 15: Lb = Lb*16;break;

case 30: Lb = Lb*8;break;

case 60: Lb = Lb*4;break;

case 240: Lb = Lb*1;break;

default: Lb = Lb;break;

}

for what is this good ???

 

Stc_color ea

Hi. All

I use following rule to change STC_COLOR EA which made by K-B. but doesnt work. pls help me to correct. Thank very much.

1. main trend time frame: 30min

2. Trade time frame: 5min

3. take profit:15pip

4. stop loss: long position:when 30min STC trend turn down.

short position: when 30min STC trend turn up.

5.buy: 1) 30min STC trend up. 2). when 5min STC<15 buy one time only

6.sell: 1). 30min STC trend down. 2). when 5min STC>85 sell one time only.

Files:
 

star821

Try this one out

________________________

Some explanations : I did not use the ones you posted but made these (indicator attached in your post has my name in it, but that version is not made by me, but that is not the only reason I did not use that indicator). The indicator attached here is optimized for this EA and identifies the up or the down trend of the Schaff trend as it should be. The EA is a simple one but as it is it can be set up for ecn brokers, no hedging and automatically recognizes 5 digit brokers. Default parameters are set as you asked for.

Did not test it as of results (I only slightly tested it to see if it works as it should as far a orders and orders closing i concerned, as of results I leave you the testing and optimizing phase )

regards

Mladen

star821:
Hi. All

I use following rule to change STC_COLOR EA which made by K-B. but doesnt work. pls help me to correct. Thank very much.

1. main trend time frame: 30min

2. Trade time frame: 5min

3. take profit:15pip

4. stop loss: long position:when 30min STC trend turn down.

short position: when 30min STC trend turn up.

5.buy: 1) 30min STC trend up. 2). when 5min STC<15 buy one time only

6.sell: 1). 30min STC trend down. 2). when 5min STC>85 sell one time only.
Files:
stc_ea.mq4  7 kb
 

Hi Mladan

Thank you very much. it is very good. I will testing it .

mladen:
star821

Try this one out

________________________

Some explanations : I did not use the ones you posted but made these (indicator attached in your post has my name in it, but that version is not made by me, but that is not the only reason I did not use that indicator). The indicator attached here is optimized for this EA and identifies the up or the down trend of the Schaff trend as it should be. The EA is a simple one but as it is it can be set up for ecn brokers, no hedging and automatically recognizes 5 digit brokers. Default parameters are set as you asked for.

Did not test it as of results (I only slightly tested it to see if it works as it should as far a orders and orders closing i concerned, as of results I leave you the testing and optimizing phase )

regards

Mladen
 

TakeProfit with Martingale EA

Hello,

perhaps anybody can help me. If i have a Martingale EA. This EA opens for example three or more SELL-Orders. If all open Orders arrive the TakeProfit is it possible if the price goes in good direction, to move this TakeProfit. The goal is to maximise the Profit. Anybody know's how i can code it or has see this function in another EA?

Best Thanks,

halobungie

 

Sounds like a normal trailing stop. Why not just look at any of the many EA's out there that have a TS and adapt the code to suit your needs?

Lux

 

I think you can find this famous ea call DTS-1, If you have sufficient money to open 50 to 200 lots. it can earn a lot money.

halobungie:
Hello,

perhaps anybody can help me. If i have a Martingale EA. This EA opens for example three or more SELL-Orders. If all open Orders arrive the TakeProfit is it possible if the price goes in good direction, to move this TakeProfit. The goal is to maximise the Profit. Anybody know's how i can code it or has see this function in another EA?

Best Thanks,

halobungie
Files:
dts1_small.jpg  25 kb