Daily Vertical Lines in MT5 - page 2

To add comments, please log in or register
[Deleted]  
GBFX MQL5:

Just seeing this.

Thanks for tackling one out of two.

Could you point out exactly where in the code you changed so I could in future do same for other indicators.

I will let you know when I get a solution to the visibility issues.

Thanks again.


These lines allow the line back ground to be changed once the indicator is running.

input bool   Line_1_Backgroud = true;           // Line 1  Background
input bool   Line_2_Backgroud = true;           // Line 2  Background
input bool   Line_3_Backgroud = true;           // Line 3  Background
input bool   Line_4_Backgroud = true;           // Line 4  Background
input bool   Line_5_Backgroud = true;           // Line 5  Background
input bool   Line_6_Backgroud = true;           // Line 6  Background


These lines set the line to back ground or not based on the above true or false.

ObjectSetInteger(0, "T1"+IntegerToString(i), OBJPROP_BACK, Line_1_Backgroud);
ObjectSetInteger(0, "T2"+IntegerToString(i), OBJPROP_BACK, Line_2_Backgroud);
ObjectSetInteger(0, "T3"+IntegerToString(i), OBJPROP_BACK, Line_3_Backgroud);
ObjectSetInteger(0, "T4"+IntegerToString(i), OBJPROP_BACK, Line_4_Backgroud);
ObjectSetInteger(0, "T5"+IntegerToString(i), OBJPROP_BACK, Line_5_Backgroud);
ObjectSetInteger(0, "T6"+IntegerToString(i), OBJPROP_BACK, Line_6_Backgroud);


You can add these lines to the indicator to control the visibility from the code, but not the inputs, just add the time frames you want.

ObjectSetInteger(0, "T1"+IntegerToString(i),OBJPROP_TIMEFRAMES,OBJ_PERIOD_M1||OBJ_PERIOD_M2||OBJ_PERIOD_M3||OBJ_PERIOD_M4||OBJ_PERIOD_M5);
ObjectSetInteger(0, "T2"+IntegerToString(i),OBJPROP_TIMEFRAMES,OBJ_PERIOD_M1||OBJ_PERIOD_M2||OBJ_PERIOD_M3||OBJ_PERIOD_M4||OBJ_PERIOD_M5);
ObjectSetInteger(0, "T3"+IntegerToString(i),OBJPROP_TIMEFRAMES,OBJ_PERIOD_M1||OBJ_PERIOD_M2||OBJ_PERIOD_M3||OBJ_PERIOD_M4||OBJ_PERIOD_M5);
ObjectSetInteger(0, "T4"+IntegerToString(i),OBJPROP_TIMEFRAMES,OBJ_PERIOD_M1||OBJ_PERIOD_M2||OBJ_PERIOD_M3||OBJ_PERIOD_M4||OBJ_PERIOD_M5);
ObjectSetInteger(0, "T5"+IntegerToString(i),OBJPROP_TIMEFRAMES,OBJ_PERIOD_M1||OBJ_PERIOD_M2||OBJ_PERIOD_M3||OBJ_PERIOD_M4||OBJ_PERIOD_M5);
ObjectSetInteger(0, "T6"+IntegerToString(i),OBJPROP_TIMEFRAMES,OBJ_PERIOD_M1||OBJ_PERIOD_M2||OBJ_PERIOD_M3||OBJ_PERIOD_M4||OBJ_PERIOD_M5);
Vahid K
53
Vahid K  
peterpies:


These lines allow the line back ground to be changed once the indicator is running.


These lines set the line to back ground or not based on the above true or false.


You can add these lines to the indicator to control the visibility from the code, but not the inputs, just add the time frames you want.

Could you please clarify where to exactly put the code to only show the lines in specific TFs ? 

I tried to add them in different places in source code but it doesn't work :(

Thanks in advance 

Vahid K
53
Vahid K  
I found this version which someone edited it to work fine with preferred TFs . I put it here for the people who are looking for it . 
GBFX MQL5
522
GBFX MQL5  
Vahid K:
I found this version which someone edited it to work fine with preferred TFs . I put it here for the people who are looking for it . 

Thanks for looking out. Grateful.

12
To add comments, please log in or register