[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 473

 

Thought so :)

 
snail09:

Hello!

Googled but couldn't find an answer to the terminal glitch question. Can you tell me what the problem is?

MT build 402. A few days ago on one of the machines the indicator list window stopped being called up. It seems to stay focused on it but I cannot see the window itself. At first I thought the terminal was hanging, but no - it updates the price chart and I can continue working in the terminal after I press "esc". I have not noticed it with other windows. No problems on other machines with the same build of MT.

And is it terminal glitch?

I tried reinstalling, after reinstalling I transferred my custom indicators, scripts, advisors and templates. My device has only one profile - default. The problem persists.


Apparently this window is outside the monitor

 
Vinin:


Apparently this window is outside the monitor

I have a similar problem with the colour selection dialogue. The terminal is on one monitor and the colour selection dialogue appears in the corner of the other monitor. I can't figure out how to move it.

 

Good afternoon)).

I have this question. I calculate the total risk like this:

 double Amount_Risk;
         
 for(count = 0; count < OrdersTotal(); count++) {  

 OrderSelect(count,SELECT_BY_POS,MODE_TRADES);
 if(OrderType() < 2) {
 Amount_Risk += (MathAbs(NormalizeDouble(OrderOpenPrice(),Digits) - NormalizeDouble(OrderStopLoss(),Digits))*10000)*(Lots*10)/AccountBalance()*100; }
 }

That is, I loop through all open positions, find out how many points between entry points and current protective stops, multiply by lots, translate into percentages and sum it all up.

It works correctly but sometimes I get wrong value, which lasts for exactly one bar and then gets corrected to the right one.

Here, for example, "abnormal outlier"(Total Risk (%) = 272.03):

And on the next bar the correct value ( Total Risk (%) = 6.35 ):

Happens quite rarely, I even found it by accident during visual testing. How can it be fixed? Please advise.

 
tol64:

Good afternoon)).

I have this question. I calculate the total risk like this:

That is, I loop through all open positions, find out how many points between entry points and current protective stops, multiply by lots, translate into percentages and sum it all up.

It works correctly but sometimes I get wrong value, which lasts for exactly one bar and then gets corrected to the right one.

Here, for example, "abnormal outlier"(Total Risk (%) = 272.03):

And on the next bar the correct value ( Total Risk (%) = 6.35 ):

Happens quite rarely, I even found it by accident during visual testing. How can it be fixed? Can you advise me please?

Possibly due to lack of explicit initialisation of the Amount_Risk variable
 double Amount_Risk=0.0;
         
 for(count = 0; count < OrdersTotal(); count++) {  

 OrderSelect(count,SELECT_BY_POS,MODE_TRADES);
 if(OrderType() < 2) {
 Amount_Risk += (MathAbs(NormalizeDouble(OrderOpenPrice(),Digits) - NormalizeDouble(OrderStopLoss(),Digits))*10000)*(Lots*10)/AccountBalance()*100; }
 }
 
Vinin:
Probably due to lack of explicit initialization of Amount_Risk variable

No. I tried explicit initialization. Unfortunately, the error persists. Maybe there are some other options?
 
tol64:

No. Tried to do an explicit initialisation. Unfortunately the error remains. Are there any other options?

Perhaps the error is sitting elsewhere
 
NumderOrder=OrderSend(Symbol(),OP_BUY,0.1,Ask,3,Bid-SL*Point,Bid+TP*Point);
Print(GetLastError());
order_open=true;
Print("Buy");


Returns an error 1 why I can't figure out.

 
Vinin:


Apparently, this window is outside the monitor

Thank you for this search direction!

Found it. Experimenting with the resolution did not work, the desktop was indeed previously extended to two monitors.


vitali_yv 29.06.2011 14:34

I have a similar problem with the colour selection dialog. The terminal is on one monitor, the colour selection dialog appears in the corner of another monitor. I can't figure out how to move it.

Parameters of terminal windows, and not only, are in the file FolderTerminal\config\terminal.ini. In my case, I have changed parameter IndicatorsLeft=1331 to 480 (as long as it does not exceed current horizontal resolution) - that's all. Now you can move it wherever you want.

 
nuan:
NumderOrder=OrderSend(Symbol(),OP_BUY,0.1,Ask,3,Bid-SL*Point,Ask+TP*Point,Comment,Magic,Expiration,Blue);
Print(GetLastError());
order_open=true;
Print("Buying");


Returns an error 1 why I can't figure out.


See help for details.