[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 36

 

How do I close a trade at the end of the day?

if (Hour()==23&&Minute()==59) - this construction does not work in the tester. I have not understood it in real life. How to correctly test and arrange the closing condition? Thank you.
 
alexey999 >> :

Hello, everyone.

HELP. Who knows where and what to do to change the light of the symbol bar in "Market Watch". For example EUR/USD is red, I need grey or white. As far as I know it's possible only by editing files in the config folder of the terminal. I tried to look through the ini files, but I don't understand where to change colour

Press PrintScreen and paste the image to any graphic editor via the clipboard. And then you can colour in any way you like, even if it's a naked woman on your favourite symbol.

 

Hello!

I downloaded an indicator based on RSI and MA, attached below. For some reason I can not write its readings below 47 in csv, writes 2147483647, but all readings above this value writes and in the terminal too is displayed correctly. Help me to understand what's the catch...

One more small question, may someone know how to make a comma as the separating sign in MetaEditor instead of a dot. Tired of changing the format every time...

Files:
rsidk.mq4  2 kb
 
demsan писал(а) >>

Hello!

I downloaded an indicator based on RSI and MA, attached below. For some reason I can not write its readings below 47 in csv, writes 2147483647, but all readings above this value writes and in the terminal too is displayed correctly. Help me to understand what's the catch...

One more small question, may someone know how to make a comma as the separating sign in MetaEditor instead of a dot. Tired of changing the format every time...

You may be able to take only one buffer's values. There are three of them

0. MA>47

1. MA<53

And 2147483647 seems to be an EMPTY_VALUE

And it's not quite clear about the comma. If you have problems with Excel, you can change the regional settings and put a full stop instead of a comma as separator. In this case it will be identical in both Excel and MetaEditor.

 

Hi All!!!

Please help - I don't want to set Stop Loss

Files:
 
gobl1n писал(а) >>

Hi All!!!

Please help me, I don't want to set Stop Loss.

You should read the manual. You must at least use the functions correctly.

bool OrderSelect( int index, int select, int pool=MODE_TRADES)

index - Order position or order number depending on the second parameter.
select - Flag of selection method. Can be one of the following values:
SELECT_BY_POS - the index parameter transmits the ordinal number of the position in the list,
SELECT_BY_TICKET - the number of the ticket is passed to the index parameter.
pool - Data source for the selection. It is used when the select parameter is equal to SELECT_BY_POS. It can be one of the following values:
MODE_TRADES (default) - order is selected among open and pending orders,
MODE_HISTORY - the order is selected among closed and deleted orders.
bool OrderModify( int ticket, double price, double stoploss, double takeprofit, datetime expiration, color arrow_color=CLR_NONE)
ticket - Unique serial number of the order.
price - New open price of the pending order.
stoploss - New StopLoss value.
takeprofit - New TakeProfit value.
expiration - Expiration time of the pending order.
arrow_color - Colour of StopLoss and/or TakeProfit modification arrows on the chart. If this parameter is missing or its value is CLR_NONE, the arrows are not shown on the chart.

Magic is not a ticket number after all

 
Thank you for pointing out the inaccuracy!!!
 

Good afternoon.

How do I correctly write in the Expert Advisor code so that it only works after a certain time. For example, it should close after 1 hour and 20 minutes from the opening of an order and open a new one after 20 minutes from the closing of the last order. Thank you.

 

Hello! This is the piece of code where I have a problem.

double Set_SL[];
int init()
{
Set_SL[History*Depth]=1.0*Level*Point; //set the initial value for a certain array element
Alert("Init:"," Set_SL[",History*Depth,"]=",Set_SL[History*Depth]);//there is a special output to see it: (let's say) 0.0001

return(0);
}
int start()
{
Alert("Start:"," Set_SL[",History*Depth,"]=",Set_SL[History*Depth]);//here it already shows 2147483647
return(0);
}

The specified in comments occurs at timeframe change. At the same time after changing indicator parameters - it really shows previously set value (i.e. what was set during initialization). I tried again many times - the same thing: when the timeframe changes - the value of the set array element is incorrectly transferred from the special function init() to the special function start(). What is it? What am I missing here? Please tell me.

P.s.: " Set_SL[",History*Depth,"]=" this piece specially inserted to make sure that the sequence number of array element remains the same!






 
ikatsko писал(а) >>

Hello! This is the piece of code - I have a problem.

double Set_SL[];
int init()
{
Set_SL[History*Depth]=1.0*Level*Point; //set the initial value of the defined array element
Alert("Init:"," Set_SL[",History*Depth,"]=",Set_SL[History*Depth]);//Introduced it to see: it shows (assume) 0,0001

return(0);
}
int start()
{
Alert("Start:"," Set_SL[",History*Depth,"]=",Set_SL[History*Depth]);//it already shows 2147483647
return(0);
}

This is what happens when you change timeframe. At the same time after changing the indicator parameters - it shows the previously set value (i.e. what was set during initialization). I tried again many times - the same thing: when the timeframe changes - the value of the set array element is incorrectly transferred from the special function init() to the special function start(). What is it? What am I missing here? >> Give me a hint.

P.s.: " Set_SL[",History*Depth,"]=" this piece is specially inserted to make sure that the sequence number of array element remains the same!

And it would be nice to define the array size to begin with.

Reason: