Forum

indicator_separate_window how to change timeframe on on this indicator only?

I'm using 2 indicators, one is current window and the second is indicator_separate_window. How do i change thetimeframe for the secondindicator? I have tried: ChartSetSymbolPeriod ( 0 , // Chart ID NULL , // Symbol name PERIOD_H1 // Period ); But it changes both. Both

How to stop indicator flashing?

When using indicators within my EA, in strategy tester when at high speed can notice a flashing pattern from the indicator. I'm guessing it's because rates_total < 100?‌ Why does MetaTrader provide such a poor implementation when used within an EA? This is effecting my calculations.‌ Here's an

Advice for deciding which way price is currently?

Any advice on deciding this?‌ Best I can come up with i: total = 0 ; double div = 1 ; for (shift= ArraySize (close) - 1 ; shift >= 1 ; shift--) { total += (close[shift] - close[shift - 1 ]) / MathPow (div, 2.0 ); div++; } if (total > 0 )

Do I have to delete buffers?

I'm creating buffers using: double LowsBuffer[]; int copy= CopyBuffer (indicatorhandle, 1 ,start_time,stop_time,HighsBuffer); Do I have to delete them? Thanks.‌

Doing without ArraySetAsSeries(close,true)?

How do I access close[] array correctly without using ArraySetAsSeries(close,true)?‌ Currently using: ArraySetAsSeries (close, true ); for (shift= 0 ; shift < 500 ; shift++) { total += close[shift]; } thanks.‌ ‌‌

How to get close[] from within EA?

In indicators close[] is provided by OnCalculate() function . ‌Can I get close[] array from my EA?‌ Thanks.‌

Not use ArraySetAsSeries(Buffer,true); how to access buffer correctly?

In my indicator I'm using ArraySetAsSeries(Buffer,true); for series access. If I access the buffer from my EA with iCustom how can I access the series order correctly?‌ Thanks.‌

EA: Place order of 50 percent equity?

I'm new to EA's. I've decided which to open, buy/sell. How do I only open at 50% of my equity? I'm guessing Equity * 0.5. But that does not get me the amount of pips. Thanks.‌

Sharing an array between all instances of EA's?

I wish to create an array: const int profitsSize = 32;‌ double potentialProfits[profitsSize]; Is it possible to share this array with all instances of my EA? It's so the EA's can decide which currency pair to open, the most profitable one. I also need to share an int‌ too(profitIndex) so each EA

Can't draw to the window.

Moving from mql4 to mql5 but can't even draw a rectangle, tried: ObjectCreate(0, "Rectangle", OBJ_RECTANGLE , 0, time[0], 1, time[5], 2) just to get going but nothing is showing. What's wrong? Here's the full code: #property copyright "Copyright 2017, MetaQuotes Software Corp." #property link