Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 564

 
granit77:
Like this?


Yes, that's the one. Thank you very much.
 
i999i:
Hi all .... can you tell me how to fix the value of a variable in a script?

Thanks, I've got it.
 

Goodnight.

It turns out that the ability to select a line style is blocked if the line thickness is not equal to 1.

Checked this both programmatically and manually by drawing the line in the terminal and editing its properties. Build 610.

Questions like this - is it written somewhere in the manual? Also is there any other graphic property conflicts?

Thanks.

 
qomment:

Goodnight.

It turns out that the ability to select a line style is blocked if the line thickness is not equal to 1.

Checked this both programmatically and manually by drawing the line in the terminal and editing its properties. Build 610.

Questions like this - is it written somewhere in the manual? Also is there any other graphic property conflicts?

Thanks.

Here docs.mql4.com/en/constants/indicatorconstants/drawstyles says

Line style. It is only used when the line thickness is 0 or 1. Can be any of the following values:

 
AlexeyVik:

Here docs.mql4.com/en/constants/indicatorconstants/drawstyles says

Line style. Only used when the line thickness is 0 or 1. Can be any of the following values:



Indeed. Couldn't find it myself. Thank you.
 

Sorry for another elementary question.

Is it possible to draw a vertical line (vline) without it being displayed in indicator windows?

The OBJPROP_RAY property is supposed to do that but the result is the same whether OBJPROP_RAY=1 or 0. Also, ObjectSetInteger(1,name,OBJPROP_RAY,0) does not work;

#property copyright "qomment"
#property link      "https://www.mql5.com/ru/users/qomment"
#property version   "1.00"
#property strict
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
//---
   string name="vline";
            ObjectCreate(0,name,OBJ_VLINE,0,Time[100],0);     
            //ObjectSet(name,OBJPROP_RAY,0); // old mql4 - but it does not work as well
            ObjectSetInteger(0,name,OBJPROP_RAY,0);
  }
//+------------------------------------------------------------------+
 
qomment:

Sorry for another elementary question.

Is it possible to draw a vertical line (vline) without it being displayed in indicator windows?

The OBJPROP_RAY property is supposed to do that but the result is the same whether OBJPROP_RAY=1 or 0. Also, ObjectSetInteger(1,name,OBJPROP_RAY,0) does not work;

Yes, I've already seen this question and checked it out, it really doesn't work although they write in the documentation that if the OBJPROP_RAY property of a vertical line is false then the line is only displayed in the main window.
 
i999i:
Hi all, .... who knows how to commit a variable value to a script?


It depends on what you need it for, there are global variables and local variables.

If you want the script to store its value somewhere before stopping, write it into global variables like this

GlobalVariableSet

 
superman82:
Please tell me how to tell EA to close everything when bollinger's boundary is touched.


First we need a function to close everything, so what's the question?

condition if(Bid>= Upper Bollinger Boundary ) Close everything.

 
alex12:
Tell me the name of the script - it shows the history of trades in a demo account.

You don't need a script - open the account history and transfer all trades to the chart with SHIFT pressed
Reason: