Questions from Beginners MQL5 MT5 MetaTrader 5 - page 800

 
fxsaber:

Server and tester mode?

OHLC tester mode on M1.

What is a server? I don't know the server IP. So the server is real OPEN-Broker: "Open-Broker".


 
fxsaber:

Server and tester mode?

The latest results are killing it altogether.

2017.11.22 18:51:21.548 2016.11.09 12:00:00 exchange buy 1.00 RTS Splice at 98080 sl: 94130 (98070 / 98080 / 98070) // i.e. BUY at 9808080 with stop 94130 set
2017.11.22 18:51:21.548 2016.11.09 12:00:00 deal #4 buy 1.00 RTS Splice at 98080 done (based on order #4)
2017.11.22 18:51:21.548 2016.11.09 12:00:00 deal performed [#4 buy 1.00 RTS Splice at 98080]
2017.11.22 18:51:21.548 2016.11.09 12:00:00 order performed buy 1.00 at 98080 [#4 buy 1.00 RTS Splice at 98080]
2017.11.22 18:51:24.175 2016.11.09 14:05:00:00 failed modify #4 buy 1.00 RTS Splice sl: 94130, tp: 0 -> sl: 94316, tp: 0 [Invalid stops]// once it comes to modification (need to raise SL higher) - Invalid
2017.11.22 18:51:24.175 2016.11.09 14:05:00 Alert: Position modification error on TP and SL error code: 4756

Invalid.........

 
DCodec:

OHLC tester mode on M1.

What is the server? I don't know the IP of the server. And so the server is real OPEN-Broker: "Open-Broker"


Had a hard time, as did you when first encountering this error. Normalise the price by tick size (round up to 10 on RTS).
 
Alexey Kozitsyn:
It was difficult, as it was for you when you first encountered this error. Normalise the price by tick size (round up to 10 on the RTS).
I.e. to the RTS step? Hadn't thought of that. Trying it out.
 
DCodec:
I.e. before the RTS step? I did not think about it. I'll try it.

Yes, price step (tick size) = 10p. You cannot put a SL/TP between 10p.

If you use SB, there is a good NormalizePrice() function there, just for that.

 
Alexey Kozitsyn:
I had a hard time like you when I faced this error for the first time. Normalize price by tick size (round to 10 on RTS).

Victoria!!!!!! GETTING THERE. Here's me being stupid. I messed up two wires. I've been banging my head against the wall of MQL5 for three days. But the shop just opens.

I changed the code to calculate the stop:

STP = 10 * NormalizeDouble(SarMas[1]/10,_Digits);

I will change it for NormalizePrice(), it's a matter of technique.

Thank you all so much!!!! Especially Alexey Kozitsyn.

 
DCodec:

Victoria!!!!!! GETTING THERE. Here's me being stupid. I messed up two wires. I've been banging my head against the wall of MQL5 for three days. But the shop just opens.

I changed the code to calculate the stop:

I will change it for NormalizePrice(), it's a matter of technique.

Thank you all so much!!!! Especially Alexey Kozitsyn.

My pleasure. Only you'd better insert constants of tick size, since there are also ticks of 25 points.
 
Alexey Kozitsyn:
You're welcome. Only, it is better to put in tick size constants, because there are ticks of 25 p.
I don't trade those. But thanks for the idea.
 

Graphic objects in the window and sub-window are displayed below the grid line.
How can I make the grid lower and not overlap the graphic (e.g. rectangle, circle, etc.)?

 
User_mt5:

Graphic objects in the window and sub-window are displayed below the grid line.
How can I make the grid lower and not overlap the graphic (e.g. rectangle, circle, etc.)?


ChartSetInteger(0, CHART_FOREGROUND, 0, false);
or uncheck the "Graph on top" box in the graph properties.
Reason: