Skip to content

Instantly share code, notes, and snippets.

@sakex
Created November 16, 2018 18:40
Show Gist options
  • Save sakex/8d13fc2d4ef6ac8188149b5dbc7c2598 to your computer and use it in GitHub Desktop.
Save sakex/8d13fc2d4ef6ac8188149b5dbc7c2598 to your computer and use it in GitHub Desktop.
const B1 = account.GBP * EURGBP * USDEUR;
const B2 = account.GBP * GBPUSD;
if (B1 - B2 > 100) {
buy('USDGBP', account.GBP - 1000);
buy('EURUSD', account.USD - 1000);
buy('GPBEUR', account.EUR - 1000);
}
if (B2 - B1 < -100) {
buy('EURGBP', account.GBP - 1000);
buy('USDEUR', account.EUR - 1000);
buy('GBPUSD', account.USD - 1000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment