Errors, bugs, questions - page 2301
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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!
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
I couldn't do anything for 20 seconds. The Start button was greyed out the whole time.
Agent's logs.
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?
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.
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):
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.