Ask! - page 44

 

Getting ex4 file to work in Metrader

I received an indicator for metrader, however, it ends in ex4. When I copy it into the indicators folder, it does not show up. It is missing the Orange signal indicator that I can click on. When I checked, the ex4 file is in the indicators folder but does not show up in custom indicators. What should I do to fix this?

 

How do I set a label or line colour to none or transparent?

 
increase:
How do I set a label or line colour to none or transparent?

try this SetIndexStyle(0, DRAW_NONE); this removes the lines

 

Place order during certain hours

I am having trouble getting my EA to place a trades when the trading hour conditions which I have set are met.

If the EA is activated during the 14th hour ie before the conditions are met it does not place the order when the time rolls over to the 15 hour.

If the EA is activated when the conditions have already been met then it opens orders fine.

It works fine if I test it with TimeMinute() instead of TimeHour() I have also tried using Hour() but no success.

Strangely enough if I use the same conditions to delete pending orders if the condition is NOT true it deletes orders when it rolls over to the next hour.

I have tried so many things now I am desperate and any help will be much appreciated.

The EA is attached to a M1 graph

//+------------------------------------------------------------------+

//| CHECK FOR BUY CONDITIONS |

//+------------------------------------------------------------------+

if( (TimeHour(CurTime())>=15 && TimeHour(CurTime())<=16))

{

if(BuyStopOrder==0 && longconditions == true)

{

if ( OrderSend ( Symbol(), OP_BUYSTOP, Lots, longprice+spread,

3, longprice-(StopLoss*Point), longprice+(TakeProfit*Point), "",

_MagicNumber,expiration,Green ) < 0 )

{

Alert( "OrderSend Error #", GetLastError() );

return(-1);

}

}

//+------------------------------------------------------------------+

//| CHECK FOR SHORT CONDITIONS |

//+------------------------------------------------------------------+

if(SellStopOrder==0 && shortconditions == true)

{

if ( OrderSend ( Symbol(), OP_SELLSTOP, Lots, shortprice,

3, shortprice+spread+(StopLoss*Point),shortprice+spread-(TakeProfit*Point), "",

_MagicNumber,expiration,Green ) < 0 )

{

Alert( "OrderSend Error #", GetLastError() );

return(-1);

}

}

return(0);

}

 

this is probably easy for you, but can you please take this indicator and make an envelope out of it? so that the user could set it up to be a certain percentage from the center. i hope you can help me. thanks in advance

Files:
 

Can somebody create a MA which is not count in the asian session bars?

Can somebody create a MA which is not count in the asian session bars?

THX, NL

 

Hi all, I am writing an EA using either OP_BUYSTOP or OP_SELLSTOP to place an entry... However, could anyone tell me how could I check if the entry has hit? Or, the position has opened?

Thanks!

 
 

Bar Close

HI, professional

in example In an Ea we get a signal and we want to place a BUYSTOP/SellStop Order in hight of the signal bar,

We should wait to new bar open to find the Hight of signal bar , How we can do this ? (any article , post, EA , , , )

Thanks

 

Very Simple Indicator

Hi Codersguru,

I have no experience with MQL4 language, but i need a very simple yet time saving indicator.

I need to develope an indicator that will draw a horizontal line based on some arithmetic calculations. (ie. Like a camarilla indicator, except the lines do not need to be re-drawn or updated, they will be fixed).

All i need is a simple example of how to do this in the coding, and I will be able to do the rest on my own.

For example,

{

Line1 = 1+1

Draw Line1

}

I know this sounds simple, but i just don't know how to do the initial setup and getting a horizontal line drawn on my chart.

Of course there will be much more calculations and equations to this indicator, but a simple example and setup would be greatly appreciated.

Thanks!!

Reason: