Daily Vertical Lines in MT5 - page 2

To add comments, please log in or register
peterpies
33
peterpies  
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);
12
To add comments, please log in or register