Daniel Lewis / Publications
Forum
Create separate_window indicator that displays numbers
I've been trying to figure out a way to create an indicator that would be a separate_window at the bottom of chart that would simply display numbers on various bars. I don't see a way to to do it with buffers and the only object that I can find that might work is the OBJ_TEXT . The problem is that
Finding an ObjectType on multiple charts without knowing object name
In MT4, is it possible to read through all open charts and count all the HLINE and TREND objects of a specific color? I have the following code and know that the statements after the "for" loop will not work because the ObjectName function does not have a ChartID parameter. I tried looking for
MT5 accounts.dat file deleted when installing Windows 10
When upgrading to Windows 10, after launching MT5 the first time, a message in the Journal tab says "Accounts: deleted due to security reason". The old accounts.dat file exists in the \Program Files\Metatrader5\Config folder but when I copy it to the new location Windows 10 is using for MT5 config
Simple indicator locking MT4
This indicator is supposed to simply display two horizontal lines at high/low of the bar designated by StartHH and StartMM each day. As soon as I load it on a chart, it locks MT4. I took an existing indi I wrote that displays horizontal lines at support/resistance to make this indi, the original one
GlobalVariablesDeleteAll() bug
When I specify a name prefix, it's deleting all Global Variables , not just the GVs with the prefix. There's a message in the forum back in 2006 that suggests this would be fixed, it's broken again. MT4GV_TS_Prefix = "TSv2_" + Symbol ()+ "_" + Period ()+ "_" ; GlobalVariablesDeleteAll
Cannot modify fibo description in indicator that created fibo object
In an indicator, I'm trying to modify the fibo description of a fibo object I created. The code to create the object works fine: ObjectCreate (objFibID, OBJ_FIBO , 0 ,Time[HighestBar],High[HighestBar],Time[LowestBar],Low[LowestBar]); "HighestBar" and "LowestBar" are integer variables. After a couple
Manually closing deals when running multiple EAs on same account
In MT4's ticket-based system, it was fairly easy to manually close one EA's position if I had multiple EA's trading the same pair on the same account. e.g. EA #1 places EURUSD SELL order for 0.1 lots @ 1.30000, EA #2 places EURUSD SELL order for 0.1 lots @ 1.29000 and EA #3 places EURUSD SELL order
Drawing rectancle around text object to change background color
There's no way to set the background color of a text object (OBJ_LABEL or OBJ_TEXT) that I can find. A workaround would be to draw an OBJ_RECTANGLE with background property set true. This is all well and good when these objects are in a fixed location on the chart. I want to be able to specify
Anchoring Text on X-axis that can move up/down Y-axis
I have a grid indicator I wrote, I want to see the prices of each line on the chart itself, not on the right with the other prices. Is there a way to anchor it to the X-axis so it's in a fixed position on the right side of the chart that allows the text to move up and down with the lines on the
Code works on personal PC, does not on VPS
I've got a little snippet of code that works fine on my home PC at multiple brokers but fails on my forex.com VPS. External variables are defined as follows: extern int GMT_StartHH = 11; // GMT Hour to start trading extern int GMT_StartMM = 00; // GMT Minute to start trading extern int GMT_EndHH =