Errors, bugs, questions - page 2301

 
Artyom Trishkin:

For a text object located on High[], the anchor point (OBJPROP_ANCHOR property) must be set to ANCHOR_LOWER (anchor point at bottom centre).

For a text object that is located on Low[], the anchor point (OBJPROP_ANCHOR property) must be set to ANCHOR_UPPER (anchor point at the top centre).

Or ANCHOR_CENTER for both locations, the anchor point is centered.

Try it.

But that requires creating TWO objects named, for example, Hi and Lo (upper and lower extremums of a zigzag or upper and lower ends of the actual upward or downward local trend) and binding them both to the chart with the corresponding values of ANCHOR_LOWER and ANCHOR_UPPER. Wouldn't it be easier to (somehow) bind the top of the ZigZag - to the previously "bound" Bottom? This is roughly what I did, adding a line to the previous function

ObjectSetInteger(0,Obj,OBJPROP_ANCHOR,ANCHOR_CENTER); and introducing an "offset correction" to the output line if(tvT) ORT(kBtT,Low[kBtT]-2*_Point,DtT,LowClr); else ORT(kBtT,High[kBtT]+2*_Point,DtT,HighClr); //

So far it seems to be working. Thank you!

 
aleger:

But that requires creating TWO objects named, for example, Hi and Lo (upper and lower extremums of the zigzag or upper and lower ends of the actual upward or downward local trend) and binding them both to the chart with the corresponding values of ANCHOR_LOWER and ANCHOR_UPPER. Wouldn't it be easier to (somehow) bind the top of the ZigZag - to the previously "bound" Bottom? This is roughly what I did, adding a line to the previous function

ObjectSetInteger(0,Obj,OBJPROP_ANCHOR,ANCHOR_CENTER); and introducing an "offset correction" to the output line if(tvT) ORT(kBtT,Low[kBtT]-2*_Point,DtT,LowClr); else ORT(kBtT,High[kBtT]+2*_Point,DtT,HighClr); //

So far it seems to be working. Thank you!

What's the point? You can change the attachment at any time. Or am I missing something? You change the colour. So do you change the linkage.

 

After closing the debug viewer window, recompiling and running a single run in the Tester without visualisation, I got this

2018.09.27 14:01:52.784 Core 1  agent process started
2018.09.27 14:01:52.784 Core 1  connecting to 127.0.0.1:3000
2018.09.27 14:02:11.358 Core 1  tester agent authorization error
2018.09.27 14:04:15.875 Core 1  no connection
2018.09.27 14:04:15.875 Core 1  connect error

I couldn't do anything for 20 seconds. The Start button was greyed out the whole time.


Agent's logs.

DM      3       14:01:49.711    Tester  close visual tester window
RH      0       14:01:49.711    Tester  shutdown tester machine
LN      0       14:01:54.186    Server  MetaTester 5 stopped


The logs show that the Tester tried to connect to the Agent at 01:52, but the Agent (Server) itself only stopped at 01:54. Hence the inability to connect and hanging. It's a longstanding bug, but at least the cause is now clear.

 

Profiler results on historical data


The in-house OrderSend takes a third of the time. What causes such unpleasant results?

 
fxsaber:

Profiler results on historical data


The in-house OrderSend takes a third of the time. What causes such unpleasant results?

In the tester, all the trading logic is here, not on the trade server.

 
Slava:

In the tester, all trading logic is here, not on the trade server.

Almost three million ticks and only 16K OrderSend. But these trade orders take one third of the time. And on every tick there are calculations in the Expert Advisor.

Hence my question. Could you run the code of OrderSend in the profiler? In what place is there such a hitch?

I assume that if you replace the standard function with your own, it will work faster. Probably, there are some expensive checks and gestures in OrderSend. For example, if there are no History-functions and OnTrade* in the Expert Advisor (+ indicators), then forming the appropriate records/events is a waste of time.

I understand that for some people one run lasts many minutes. But there are cases like above - units of seconds, if you pay attention to speed of execution. And here it turns out that I launch Optimize for three hours, and of them one hour is OrderSend, which average execution time is 69 µs (see screenshot):

  • TRADE_ACTION_PENDING - 104 µs.
  • TRADE_ACTION_SLTP/TRADE_ACTION_MODIFY/TRADE_ACTION_REMOVE - 68 microseconds.
 
I have profiled the tester many times. And I know where the 'hitch' is there. These are financial calculations, which involve several normalisations of the results to the number of digits of the deposit currency
 
Slava:
I have profiled the tester many times. And I know where the "hitch" is. These are financial calculations, which involve several normalisations of the results to the number of digits of the deposit currency

I will write my OrderSend and compare it.

 
Hi All! I'm new to trading, I've been learning all the details about it for half a year now. It's a very tempting business, but I don't know, I often feel that all profits and losses in months or years are basically zero, in the best-case scenario.I do not want to disappoint anyone in this activity is the choice of each person, but one very important fact I just do not give peace ever in this business, it's the SPARK (SPARK is when a deal opens with -16 points or -21 points) at 16 or 21 points, or even 34 points, apparently it floats, God knows, well, how can you make money here?I have only one question: Tell me who is more experienced, such a big markup is my broker's hand (my broker says he has no markup and that it comes from a liquidity provider) or it affects everybody in general, tell me in detail if he has the markup and how many points.
 
Please note this post (or I can move it here and it can be crushed there): https://www.mql5.com/ru/forum/281440
Помогите разобраться (баг или я не понимаю чего?)
Помогите разобраться (баг или я не понимаю чего?)
  • 2018.09.28
  • www.mql5.com
Всем привет, сразу к делу...
Reason: