Coding help - page 11

 

Coding Help Please

Hello

I am not a programmer as such but use Forex Expert Advisor Generator by Etasoft and I can understand the logic of the coding required to get me well by, but I just need clarification of the below statement because my brain just cant grasp the issue.

When using MACD for instance if I want a buy signal triggered using Mode_Main > 0.0000 what would the sell signal be as it is a negative value? Would it be > -0.0000 or < 0.0000.

I have used this in my coding on other EAs but at times I get no sell trade triggered and then muck around with the logic to a point I dont know what worked or not. Its probably a dumb question but I have a perfect buy signal on what I am working on right now but no sell signal even when you simply swap the logics from > to < for a buy or sell.

Cheers

 

IMScalper + Modification = Holy Grail

I need someone to help me modify an EA I got. If modified, it will be the most fearsome profits extractor

This EA have a common scalping method, but a very strong indicator set.

It has a success rate of 95%

Unfortunately when it fails, it fails with losses that will cause fears for FOREX. I have solved the problem, but need someone to help me program. The initial EA is programmed by someone else upon my request, and he is now nowhere to be found.

The logic is that according to indicator, open a short or long position when indicators is in right timing.

1st position, TP 27. If 1st position falls equal to -30 open 2nd position.

2nd position, TP 27. Then modify all previous positions to same TP.

And so on.... until a total of 5 positions. Then a SL 150 will be set on 5th position, and the SL price will be shared by all previous positions.

Each level, lot size will double.

1st level - 0.01

2nd level - 0.02

3rd level - 0.04

4th level - 0.08

5th level - 0.16

95% accuracy is wasteful to be abandon as a failed EA.

My modification as follows:

1st position to 4th position will be a fake open. Meaning the EA will record them as open position, but will not open it in real.

If at any level, these positions hits TP, the EA will "close it" then start over again for possible entry to another round of trade.

But if there is a 4th position, and it go into -30, the EA will open a real 5th position with a user defined lot size, regardless of what lot size the previous positions are.

The 5th real position have a SL of 150. Once this position is opened, the EA will ignore it. Then another trade round starts again.

The EA will limit the total real positions as defined by user. Example if I already have 5 positions and I set 5 positions as max, it will not start another trading round, until the total positions drops below 5 as defined by me.

 
wayhuck:
I need someone to help me modify an EA I got. If modified, it will be the most fearsome profits extractor

This EA have a common scalping method, but a very strong indicator set.

It has a success rate of 95%

Unfortunately when it fails, it fails with losses that will cause fears for FOREX. I have solved the problem, but need someone to help me program. The initial EA is programmed by someone else upon my request, and he is now nowhere to be found.

The logic is that according to indicator, open a short or long position when indicators is in right timing.

1st position, TP 27. If 1st position falls equal to -30 open 2nd position.

2nd position, TP 27. Then modify all previous positions to same TP.

And so on.... until a total of 5 positions. Then a SL 150 will be set on 5th position, and the SL price will be shared by all previous positions.

Each level, lot size will double.

1st level - 0.01

2nd level - 0.02

3rd level - 0.04

4th level - 0.08

5th level - 0.16

95% accuracy is wasteful to be abandon as a failed EA.

My modification as follows:

1st position to 4th position will be a fake open. Meaning the EA will record them as open position, but will not open it in real.

If at any level, these positions hits TP, the EA will "close it" then start over again for possible entry to another round of trade.

But if there is a 4th position, and it go into -30, the EA will open a real 5th position with a user defined lot size, regardless of what lot size the previous positions are.

The 5th real position have a SL of 150. Once this position is opened, the EA will ignore it. Then another trade round starts again.

The EA will limit the total real positions as defined by user. Example if I already have 5 positions and I set 5 positions as max, it will not start another trading round, until the total positions drops below 5 as defined by me.

This type of Martingale style lot sizing usually result in high percentage of profitable trades, however, unless you have unlimited margin, sooner or later a death trade will occur. So be careful with this type of strategy.

 
christinaLi:
This type of Martingale style lot sizing usually result in high percentage of profitable trades, however, unless you have unlimited margin, sooner or later a death trade will occur. So be careful with this type of strategy.

You are actually incorrect as I have a 150 Stop Loss in place.

Besides, I erase the 4 positions totally by using fake orders.

Also the 5th position is a real position based on user defined lot size.

It will be the only real position in the whole trade round.

6th or 7th position are not allowed as well. With 95% accuracy, by the time I get a death trade of 150 points, I would have already earn 1000+ points.

A death trade does not always occur, so profits erase losses.

If you read carefully, I can already tell you that so far no one in the market today have actually modify an EA up to this point.

Total number of real positions will be limited as defined by user.

It will not have 2 positions of same currency pair.

 

Help! make me mad

Hi

Would you please help me to find my error?? please

this is my coding and in compilation i recieve "End of program" error continuesly.

 

Moving SL a second time

Hi folks,

I'm trying to make my EA move my SL after price has moved in my favor a certain number of pips (that is more than once). The first ordermodify (=breakeven) is executed according to plan but the second one never happens (within a backtest period of one year) so I wanted to know what is wrong. No error msgs while compiling or backtesting. The function just never starts. Help would be appreciated.

p.s.: no, I don't want to set a trailing stop. I just want to correctly code "move the SL when price has moved XY pips" several times for the same order (but every time with a different amount of pips => no trailing stop).

Files:
trainingea.mq4  11 kb
 

You were missing some ")" (right brackets)

Here is the corrected one that is working

Mistake:
Hi

Would you please help me to find my error?? please

this is my coding and in compilation i recieve "End of program" error continuesly.
 
 

Help needed

Hi I have an indicator made for Ninja trader NT7.

I cant find it for MT4

Is it possibel that here on TSD, a coder can help me code it for MT4

regards

Fratelli

 

Did they ever add timezone detection in MT4?

Reason: