I created a script which compares the percent movement of all pairs over the course of the day and, from those numbers, averages out the percent movement of each individual currency. So at the end, I know how much JPY, AUD, EUR, USD, GBP, CAD, NZD, and CHF have moved individually on the previous day. What I would like to do is determine which currency's % movement value is highest (gained the most) and which currency's % movement is lowest (lost the most) and then reference those two values to form a pair for an order command (if that pair exists).
So if USD gained 2% in a day compared to all currencies, and AUD lost 1.5% in a day compared to all currencies, I would want to open a short trade on AUDUSD at Sydney open the next day.
I will share the script if anyone thinks they can help me understand the sorting procedure or if you think you can tweak the existing script to do what I'm describing. Visual tests over time have been promising but I want to back test it and am not very good at actual programming.
Thanks
So if USD gained 2% in a day compared to all currencies, and AUD lost 1.5% in a day compared to all currencies, I would want to open a short trade on AUDUSD at Sydney open the next day.
I will share the script if anyone thinks they can help me understand the sorting procedure or if you think you can tweak the existing script to do what I'm describing. Visual tests over time have been promising but I want to back test it and am not very good at actual programming.
Thanks