Download MetaTrader 5

Experts: Demark Lines EA

To add comments, please log in or register
Hundreds of articles will help you to create a trading robot. Come and read them!
MetaQuotes Software Corp.
Moderator
181409
MetaQuotes Software Corp. 2008.08.02 07:56 

Demark Lines EA:

This expert is based on the famous DeMark Lines indicator.

Author: bobby

MQL4 Comments
16319
MQL4 Comments 2008.08.03 23:50  
What is the best time frame to use this on?  Also, which pairs???  TIA!
MQL4 Comments
16319
MQL4 Comments 2008.08.04 06:28  

Hi funyoo!

I have a couple of quick questions for you....

1. Why does it open 4 orders?  Just curious...

2. I noticed that on one of my charts the trend was previously showing down, but then reversed long...But, there was NOT a blue demark line/alert to show that the trend had reversed upward.  Is there something that can be done to correct this?


Missing Blue Demark Alert???

Piotr
1249
Piotr 2008.08.04 14:01  

GREAT JOB,

BUT YOU HAVE MADE AN ERROR ON OP_SELLIMIT. YOU HAVE DOUBLED OP_BUYLIMIT AS OP_SELLIMIT. PLEASE CHECK THIS CODE:

case OP_SELLLIMIT:
        if (!IsTradeContextBusy() && IsTradeAllowed()) {
        while (tries < NumberOfTries) {
            RefreshRates();
            if ((_price-Bid)<_stoplevel*Point) _priceop=Bid+_stoplevel*Point; else _priceop=_price;            
            ticket = OrderSend(_symbol,OP_BUYLIMIT,_volume,NormalizeDouble(_priceop,Digits),_slippage,NormalizeDouble(_stoploss,Digits),NormalizeDouble(_takeprofit,Digits),_comment,_magic,_expiration,_arrow_color);
            if(ticket<=0) {
                Write("Error Occured : "+ErrorDescription(GetLastError()));
                Write(Symbol()+" Sell Limit @ "+_priceop+" SL @ "+_stoploss+" TP @"+_takeprofit+" ticket ="+ticket);
                tries++;
            } else {
                tries = NumberOfTries;
                Write("Order opened : "+Symbol()+" Sell Limit @ "+_priceop+" SL @ "+_stoploss+" TP @"+_takeprofit+" ticket ="+ticket);
            }
            Sleep(RetryTime*1000);
        }
        err=ticket;
        }

        break;


There should be:

case OP_SELLLIMIT:
        if (!IsTradeContextBusy() && IsTradeAllowed()) {
        while (tries < NumberOfTries) {
            RefreshRates();
            if ((_price-Bid)<_stoplevel*Point) _priceop=Bid+_stoplevel*Point; else _priceop=_price;            
            ticket = OrderSend(_symbol,OP_SELLLIMIT,_volume,NormalizeDouble(_priceop,Digits),_slippage,NormalizeDouble(_stoploss,Digits),NormalizeDouble(_takeprofit,Digits),_comment,_magic,_expiration,_arrow_color);
            if(ticket<=0) {
                Write("Error Occured : "+ErrorDescription(GetLastError()));
                Write(Symbol()+" Sell Limit @ "+_priceop+" SL @ "+_stoploss+" TP @"+_takeprofit+" ticket ="+ticket);
                tries++;
            } else {
                tries = NumberOfTries;
                Write("Order opened : "+Symbol()+" Sell Limit @ "+_priceop+" SL @ "+_stoploss+" TP @"+_takeprofit+" ticket ="+ticket);
            }
            Sleep(RetryTime*1000);
        }
        err=ticket;
        }

        break;



MQL4 Comments
16319
MQL4 Comments 2008.08.04 19:07  
puncher:

GREAT JOB,

BUT YOU HAVE MADE AN ERROR ON OP_SELLIMIT. YOU HAVE DOUBLED OP_BUYLIMIT AS OP_SELLIMIT. PLEASE CHECK THIS CODE:

case OP_SELLLIMIT:
        if (!IsTradeContextBusy() && IsTradeAllowed()) {
        while (tries < NumberOfTries) {
            RefreshRates();
            if ((_price-Bid)<_stoplevel*Point) _priceop=Bid+_stoplevel*Point; else _priceop=_price;            
            ticket = OrderSend(_symbol,OP_BUYLIMIT,_volume,NormalizeDouble(_priceop,Digits),_slippage,NormalizeDouble(_stoploss,Digits),NormalizeDouble(_takeprofit,Digits),_comment,_magic,_expiration,_arrow_color);
            if(ticket<=0) {
                Write("Error Occured : "+ErrorDescription(GetLastError()));
                Write(Symbol()+" Sell Limit @ "+_priceop+" SL @ "+_stoploss+" TP @"+_takeprofit+" ticket ="+ticket);
                tries++;
            } else {
                tries = NumberOfTries;
                Write("Order opened : "+Symbol()+" Sell Limit @ "+_priceop+" SL @ "+_stoploss+" TP @"+_takeprofit+" ticket ="+ticket);
            }
            Sleep(RetryTime*1000);
        }
        err=ticket;
        }

        break;


There should be:

case OP_SELLLIMIT:
        if (!IsTradeContextBusy() && IsTradeAllowed()) {
        while (tries < NumberOfTries) {
            RefreshRates();
            if ((_price-Bid)<_stoplevel*Point) _priceop=Bid+_stoplevel*Point; else _priceop=_price;            
            ticket = OrderSend(_symbol,OP_SELLLIMIT,_volume,NormalizeDouble(_priceop,Digits),_slippage,NormalizeDouble(_stoploss,Digits),NormalizeDouble(_takeprofit,Digits),_comment,_magic,_expiration,_arrow_color);
            if(ticket<=0) {
                Write("Error Occured : "+ErrorDescription(GetLastError()));
                Write(Symbol()+" Sell Limit @ "+_priceop+" SL @ "+_stoploss+" TP @"+_takeprofit+" ticket ="+ticket);
                tries++;
            } else {
                tries = NumberOfTries;
                Write("Order opened : "+Symbol()+" Sell Limit @ "+_priceop+" SL @ "+_stoploss+" TP @"+_takeprofit+" ticket ="+ticket);
            }
            Sleep(RetryTime*1000);
        }
        err=ticket;
        }

        break;



Why do you say that when he's gotten results?   The test data has proven itself as it is -does it matter? or is what you're saying will make the EA better? (to puncher)

Piotr
1249
Piotr 2008.08.04 20:23  

Perhaps I am wrong, whether this is true? I do not know. Don't you think so, that this EA requires changes in the code MQL? Exactly I mean about this line:

OrderSend(_symbol,OP_BUYLIMIT,_volume,NormalizeDouble(_priceop,Digits),_slippage,NormalizeDouble(_stoploss,Digits),NormalizeDouble(_takeprofit,Digits),_comment,_magic,_expiration,_arrow_color);


In my opinion there should be the other line instead above line:

OrderSend(_symbol,OP_SELLLIMIT,_volume,NormalizeDouble(_priceop,Digits),_slippage,NormalizeDouble(_stoploss,Digits),NormalizeDouble(_takeprofit,Digits),_comment,_magic,_expiration,_arrow_color);


Do not you think so? (to: EliTheGiant)

MQL4 Comments
16319
MQL4 Comments 2008.08.06 06:03  
I have put the EA on my charts and it's been like 3 days without placing any trades...Is this normal for it to take this long to place a trade?? I have it on all time frames...  :-|
Piotr
1249
Piotr 2008.08.06 06:42  
bnbb2004:
I have put the EA on my charts and it's been like 3 days without placing any trades...Is this normal for it to take this long to place a trade?? I have it on all time frames...  :-|

What time frame did you put? Probably if you have putted dayli  or 4h timeframe it is quite possible... I think, but I did not make this EA

MQL4 Comments
16319
MQL4 Comments 2008.08.07 07:05  
puncher:
bnbb2004:
I have put the EA on my charts and it's been like 3 days without placing any trades...Is this normal for it to take this long to place a trade?? I have it on all time frames...  :-|

What time frame did you put? Probably if you have putted dayli  or 4h timeframe it is quite possible... I think, but I did not make this EA

I put it on all time frames ranging from 5M up to Daily, and it still hasn't placed 1 trade....The EA is 'smiling' and ready for live trading....Any other suggestions to get this EA to start trading???
FXIA
76
FXIA 2008.08.09 03:06  

I ran the same backtest with the settings shown above and get different results. With errors during backtest including order modify error. I have losing trades as well which were not shwon in the results of the backtest from the one that uploaded this EA.



How are forward test results with this EA?

MQL4 Comments
16319
MQL4 Comments 2008.08.10 20:43  
puncher:
bnbb2004:
I have put the EA on my charts and it's been like 3 days without placing any trades...Is this normal for it to take this long to place a trade?? I have it on all time frames...  :-|

What time frame did you put? Probably if you have putted dayli  or 4h timeframe it is quite possible... I think, but I did not make this EA

Do I need to change any of the parameters/inputs to TRUE?? Also, do BOTH "Allow DLL imports" need to be checked on the indicator and the EA?? This is still not placing any trades after 1 week.  :-(   Please help!
12
To add comments, please log in or register