Forum

Ontick and OnTimer not working for an indicator

Hello all, I have tried searching for this answer, but could not find the answer I am looking for. I would like my OBJ_HLINE to update every tick to be at the current bid price. To test if OnTick or OnTimer were working I used these: void OnTick () { Print ( "onTickworking" ); } void OnTimer () {

Stuck in while-loop (MT4)

Hi, In my code i have two lines EntryPriceLine and StopLossLine If i drag my EntryPriceLine i would like to have real time feedback of the StopLossLine. So the two lines should always be 12 pips apart. Even while dragging. I thought using a while loop and WindowRedraw() would fix this, but if i let

Create a Hline using a custom button (MT4)

Hi, I want my EA to have a custom button on screen. When I press this button it should allow me to place a horizontal line on the chart. However, whenever I click on my button, the Hline(s) is/are also immediately placed. It seems the CHAREVENT_CLICK gets triggered anyways. Anyone can help me fix

[HELP] 2 charts always same symbol MT5

Hi, I searched google for a while, but i couldnt find the solution. I have 2 charts 15m and 1H. If i change the symbol of the 15M chart, i want the 1H chart to automatically change to that symbol as well. for MT5 Does anybody know how to make this work. Script