Well, you can start by clearly defining what you want to do. I can see you haven't.
You're talking about apples and pears. First its BE on multiple orders (or is that positions as orders haven't been hit yet to create positions ?) and then it's multiple pairs average, so how does that work on say Eurusd at 1.20 v. UsdJpy on 121.00 something ? What's the average of a 100 units EurUsd at 1.20 and 112 units UsdJpy at 121.00?
To do what you want to do, if I read it correctly, you'd have to work out the weighted average on each pair you're trading, and then convert ALL OF THEM to a USD value, iow's create a USD weighted average of the weighted averages of your positions. If you intend to do it correctly that is. And to code that is a shit load of work. At least a thousand lines of code, maybe more.
It's not for an amateur. You need to know what you're doing to do this. But doing it will be absolutely invaluable to your trading. It is well worth doing even if it is difficult. And it's not valuable because of any result it gives you, it's valuable because it will teach you how to view fx positions as quantifiable assets and calculate their value at any given time.
In effect it also means you're trading USD against everything. Is that what you want to do ? Because that's what you're about to do. And USD moves around in value all the time, so your targets are moving.
So now that we've had a look at a few of the details, tell me clearly and concisely what you want to do and I will see if I can help.
So @compuforexpamm, where exactly in this is the conversion to compare say a JPY position to a EURO position or a USD position to compare 'once the threshold has been crossed across the multiple pair average '?
Each pair has to go to a single value to be comparable. That code is useless for his purposes.
고위험 경고: 외환 거래는 모든 투자자에게 적합하지 않을 수 있는 높은 수준의 위험을 수반합니다.
레버리지는 추가적인 위험 및 손실 노출을 만듭니다. 외환 거래를 결정하기 전에 투자 목표, 경험 수준 및 위험 허용 오차를 신중하게 고려하십시오.
초기 투자의 일부 또는 전부를 잃을 수 있습니다. 잃을 여유가 없는 돈을 투자하지 마십시오. 외환 거래와 관련된 위험에 대해 스스로 교육하고 궁금한 점이 있으면 독립 금융 또는 세무사에게 조언을 구하십시오.
모든 데이터 및 정보는 정보 제공 목적으로만 있는 그대로 제공되며 거래 목적이나 조언을 위한 것이 아닙니다.
과거의 성과는 미래의 결과를 나타내는 것이 아닙니다.