Ian Tavener / Publications
Forum
difficulty using ObjectSetText
I've been using Bahnschrift font for an EA on Windows 10. Tested it on other OS, and found that Bahnschrift font is not working properly on Windows 7, and it reverts to Arial. So I tried the following: #resource "\\Files\\bahn_bold.ttf" string bahn_bold = "::Files\\bahn_bold.ttf" ; Void
VPS minimum specs
I'm planning on renting a VPS , but before I do, I'm trying to find out recommended specs. I'm planning to run 4-6 terminals, with 1 chart on each, running an EA that receives data from 28 pairs. I'm looking at instances that have 1 or 2 vCores @ 2.4GHz, and 2, 4 or 8GB RAM. Will one of these
Why is this still writing to file?
I created a function to rewrite my order history for the month of March to an existing file, but I only want it to rewrite if the OrderTicket() does not exist in the file. The first time I run it, it writes all March's orders to separate files based on strategy, and it works just fine. But when I
CryptEncode, WebRequest combo for client validation
I'm trying to do my best to find a way to control client keys, without using DLL. So far the method I'm using, is I use a keygen script that uses AES256 then Base64 on a list of customer names, to create an array of 'serial' codes, and then publish that array to a directory on my website. Then when
Using FileOpen to protect a .csv
My EA creates, writes to, and reads from .csv files while it's running. One issue I noticed was that if I open the .csv in Excel to read it, my EA will not be able to open it and write to it. Would it make sense to use FileOpen during initialization, and keep the .csv files open (and then close in
Can I call MathSrand() multiple times in EA?
I use current month+ current day+account number as a seed for MathSrand() to generate a pseudo-random magic number each day. I would want to be able to look at trade history and create a report of all trades that hit SL (for example), so I would want to get a new seed for each day in history to be
Am I using 'while' properly here?
I want the code to ensure all trades are closed. Will this while loop function ? Do I run the risk of becoming stuck? bool result= false ; while (!result && ! IsStopped ()) { result= true ; for ( int cnt= OrdersTotal ()- 1 ; cnt>= 0 ; cnt--) { if (! OrderSelect (cnt
Can I reference contents of the Expert tab from an EA?
I'm creating an EA that is meant to be run in fullscreen mode (F11), but I would still like to display important messages from the Expert tab on the chart, more than just Print(message), since it's easy enough for me to duplicate those messages as Objects. Is there a buffer or command that someone
datetime sums
I'm hoping someone can confirm this for me, since I'm having a difficult time with an EA adjusting for timezones. if I have a datetime value, and I want to add for example, 3 hours to that time, could I use this? datetime RightNow= TimeCurrent (); int Adjust= 3 ; //3 hours adjust datetime
Is there a simple way to get the price from x seconds ago? Or do I need to build an array of these prices?
I'm working on an EA, and I want to compare the current market price to the price from 30 or 90 seconds ago. Is there a way to get this info from MarketInfo? Or does my EA need to record prices and timestamp them