True Market Momentum EA based on my script

 

Hey folks. I wrote a script (held together with glue and luck) which examines the percent movement of all pairs from the current and previous day and uses those percentages to average the total percent movement of each individual currency on each of those days. Currently, the script spits out D0 and D1 values into a csv for USD, EUR, GBP, CHF, AUD, NZD, JPY. Then, I have some other windows-based scripts that sort them and dumps the image into my dropbox regularly. Here is an example.

So I've been watching this for a few months and if the best and worst values exceed certain limits (if it wasn't a slow day), it appears that there is a really good chance the pair in question will continue under those suggestive numbers some amount the next day -- at least some trustworthy percentage.

For instance, if USD moves -1.5% across all pairs and EUR moves 2% across all pairs in a day, a long trade on EURUSD on market open will typically see movement to the upside some amount just based on the market forces from the previous day either washing out or continuing. It doesn't really have anything to do with EURUSD's movement the day before-- just the pairs' power throughout the market elsewhere. I'm thinking about using a % of the previous day's range as a target.... something like 1/4 or 1/3.

So my concept is to have an EA which uses the data I'm already pulling to open a trade on market open on the applicable pair. I want to back test it feverishly but I have no idea how to program it properly... or even improperly.

Some of my confusion lies in my ignorance of arrays and some of it lies in my inability to determine how to use strings to turn a USDAUD signal into an AUDUSD trade. Also, if the high and low currencies are not available as a tradeable pair by your broker, you won't be able to trade it (CADCHF, for example). But there are very few cases when this matters. I think I've seen it once and the extreme movers weren't even significant enough to trade.

Please let me know if you're able to help in any capacity. I'd really appreciate it.

Thanks

Reason: