Forum

IndicatorRelease WHEN needed?

Hi I wonder when i must release Indicator and when not? i have a custom RSI so sometimes the EA load "myRSI" and sometime he removing the indicator. No i am worrying if i do this maybe 200 times that there will be buffers every time and i may run in memory troubles. OR is MetaTrader clever and

MQL5 pending order expiriance every friday

Hi It looked verry easy to my but now i get error: TimeToStruct ( TimeCurrent (),myTime); if (myTime.day_of_week!= 5 ) { // HERAUSFINDEN WIE DATUM VOM FOLGENDE FREITAG GEHT request.type_time= ORDER_TIME_SPECIFIED_DAY ;

Position // Order // Deal - Working on deeper understanding - to find out if a pendingorder is deleted od executed

Hi In order to properly find out if my pending order is executed i try to exactly understand how it works: So i find out I can place a pending order ( trade_action_pending ) then i get result.deal=0 result.order=12345678 order.result ist the order ticketnumber right? now here comes the first

AGAIN: Calculate lot size wit fix risk and fix points

i scrolled to many pages but the moor i read them the less i understand. Basicli it is simple math Balance in USD Distance 500 Points myBalance is 10000 USD myRisk 2% myRiskMoney 200 USD myLot is then 200USD / 500 Points Job done! (Help me if the code is wrong so far:) double myBalance

double treated as integer - never seen bug?

The math is simple: 155/32 = 4.84375 Not here: void OnTick () { double tmp = 155 / 32 ; Print (tmp); MessageBox ( DoubleToString (tmp, 3 )); } I do not have any clue wath went wrong here

Rounding Problem with uint

Hi Can someone explayn to my where this comes from: input double SL = 1.23400; uint mySL = 0 ; void OnTick () { mySL = uint ( NormalizeDouble (SL, 5 )/ _Point ); Comment ( IntegerToString (mySL)); } This code with a 1.23400 prints a value 123399 >> so i miss 1 point - i can not finger out why

MQL5 type conversion

Hi I think i get type conversion warning because ulong has no negative value possible, but the calculation could finish negative... (For understanding the fSpot is a double with the actual price witch is turned in his one magicnumber by multiplying it with 1000000) ...i know it will not, but how to

MQL5 CopyLow returns Bid prise

Hi I code a trailingfunktion below one of the last candles. But this code returns the lowest Bid price - fine so far but i need the Ask price. double lowest = 0 ; int TrailingCandles = 2 ; int minIdx; //-- Tiefpreis aus X(TrainilgCandles) Candels double low[];

MQL5 CloseTradeFunction

//_____________________________________________________________________________________________________________________________ bool CloseMarginals( double fSpot){ // //=============================================================================================================================

Check if magicnumber exists MQL5

Hi Im freaking out to check if Magicnumber XXXXXX[1-9] exist. How can i search in heding mode for magicnumbers of actual symbol. (I remember the way it is codet in MT4 but i can not find out how to fine it in MT5) ist there something like: //Loop with cnt=++ if (Search Positions (Magicnumber =