Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1544

 
AndreyTreid #:
Can you tell me, when I add RSI to the Expert Advisor
.

When I start the tester I get a subwindow with RSI, with standard lines 70 and 30, how can I add my own line 50 for example in this subwindow?

In the code of RSI indicator, which is in the folder Examples, add a line:

#property indicator_level3 50

However, this line may disappear when the terminal is updated.

 

This method does not work in the strategy tester. RSI starts with standard 70 and 30

 
AndreyTreid strategy tester. RSI starts with standard 70 and 30

Well, if it is not very important, then so:

rsiHandle = iCustom(_Symbol, _Period, "Examples\\RSI.ex5", 14, PRICE_CLOSE);
 
It's working, thank you.
 

The compiler in the following code

if(VolatilitiLow1==0&&VolatilitiLow2>0&&VolatilitiLow3==0&&VolatilitiLow4>0&&VolatilitiLow5==0&&VolatilitiLow6>0)
{
   double Array42[]={VolatilitiUp1,VolatilitiLow2,VolatilitiUp3,VolatilitiLow4,VolatilitiUp5,VolatilitiLow6};
   int IndMax=ArrayMaximum(Array42,WHOLE_ARRAY,0);
   Volatiliti=Array42[IndMax];
}

sees the error "array out of range".

It turns out that the program agrees that the variables exist, that they fall under the if clause, but expressions from these variables do not create array items.

What am I doing wrong?

Files:
 
Comrades, how to catch the event of closing an order by take profit or stop loss? OnChartEvent does not want to
 
Problem: on both demo and real accounts neither Volume for Real Volume (shows only for ticks) nor Open Interest.
Checked in Debbuger, on event OnCalculate series volume comes with zero values, and function
double interest=SymbolInfoDouble(Symbol(),SYMBOL_SESSION_INTEREST);
gives 0.

I tried to chat with online support, but there are half-assed people sitting there (on two brokers: ProForex and Libertex) and they answer "we can't help you! sorry!".

Who knows what to do?!
Thanks in advance!!!!
 
wgomer #:
Who knows what to do!!!

Trade on the exchange - open interest and real volumes are unknown to the decentralised market.

 
maxvoronin74 array items.

What am I doing wrong?

I apologise for my inattention. Of course, it is not the compiler, but the terminal that generates the error.
Files:
 

How do I calculate margin in MT5 demo account?

I have made a trade for USD vs Gold with Volume = 1 (it says 100 XAUUSD on the side but not sure it that means lots or micro lots etc.), price = 2422 with leverage of 1:30 and suddenly margin appeared on open position then disappeared when I closed position with TP of $101 (though I still have free margin equal to my balance & equity). It says margin is ~12k but not sure how it got there...