Posts by Raiden
| Previous 1 2 3 4 5 6 7 .. 25 Next |
|
Whoops, I notice my comments in my CloseAll() function says it closes Pending Orders too but it doesn't. I forgot to update it when I separated it out.
|
|
This is an example of the fallout to be expected.
Facebook Co-Founder Saverin Renounces Citizenship
http://www.cnbc.com/id/47389619
|
|
You could copy that text, open the Meta Editor, and paste that into an EA. (There are two more variables that need to be defined though.)
But you should skip that and just use the Multi Purpose Trade Management EA by Steve Hopwood in the forexfactory.com link.
|
|
I never mentioned Metaquotes.
Google this "Multi Purpose Trade Management EA". Read the 1st entry, it should be from forexfactory.com
... sometimes I can sympathise with Steve.
|
|
I meant 2 months per year in the earlier post.
|
|
There's also a hint of protectionism here, on 2 levels.
1. The incumbent American banks having no choice but to be compliant, have their revenue increased from American investors exiting (or being rejected) from non-compliant non-US banks. Of course, it can construed that being compliant is an open choice, however, it is a choice where the foreign bank has to consciously decide to pick customers whose profit margin generated is less. And any business that chooses increased revenue over better margins is typically in a bad situation, where it needs to cover fixed costs more than increase its p......
|
|
This is crazy part, "The definition includes citizens, green-card holders and non-Americans deemed U.S. residents by being present in the country for at least 183 days over a three-year period, which makes them subject to U.S. tax on their worldwide income, according to the IRS."
Even being a foreign national, if you spend an average of 2 months in the US for the last 3 years, your worldwide income is taxable. I was thinking about how ridiculous it would be that the income generated in the remainder 30 months spent working elsewhere would be taxable by the IRS, but then it can't be......
|
|
More specifics would help.
By the title, it also sounds more like a trade management EA. Steve Hopwood wrote an excellent Multi Purpose Trade Management EA (MPTM). Read its documentation, it'd probably do what you want.
That said:
extern bool EquityStopLoss = TRUE;
extern double EquityPercent = 10.0; //for 10% drawdown
int start(){
if(EquityStopLoss&&1-AccountEquity()/AccountBalance()>EquityPercent/100){ //if drawdown exceeds 10%
CloseAll(); //Close all trades
}
}
void CloseAll(){ //Close all BUY and SELL orders including Pending Orders if any
bool result=false;
......
|
|
[quote]
san4x posted:
Good work. You can be proud of your logic.
[/quote]
Whoops, missed your post. Thanks for the kind words.
It's a real labour of love. Emphasis labour.
|
|
2012-05-01 Soft SL (-3%) hit. Not a good idea to be trading with so many countries being on holiday. China, Japan, Switzerland, France, Germany, Italy. Primary action from Australia, UK and US markets only. Didn't really affect (or so I observe/think) but RBA changed its cash rate from 4.5% to 3.75%, down 0.25% more than the expected 4.00%. US ISM Manufacturing was a mover.
|

Share