Worst Case Script

Maverick

Master Trader
Apr 3, 2014
464
8
79
Bournemouth UK
Can anybody please point me to "Worst Case" script.

Armageddon.png

If for whatever reason I don't have a SL in place or I just took my eye of the ball I would like to know my back is covered

Worst case = Market has turned and I am heading for a margin call 🙁

I would like a script to close my account at a pre set Armageddon level (my original stake) before the margin call

Least then I COULD start again and am no worse of - apart from time and pride

PS . . . Has to work in £'s and not Lots
.
 
Should be an EA, not a script,
Probably why I haven't been able to find a script then 🙁

H'mmm & more H'mmm - the idea was a safety net in the background - just in case the worst did happen.

An alternative to margin call which often is too late to recover

Basically I never want to lose more than I started with

H'mmm again . . . what if the margin call level was a figure instead of a percentage ?

Make margin call a variable . . . % or £ . . . with 10% being the ABSOLUTE minimum

If for instance I started with £20 then I might want to set my margin call to £21

Yes I want this for spreadbetting BUT could work with Lots with a little tweaking . . . maybe an option . . . £ or Lot

Then again . . . H'mmm
 
Should be an EA, not a script
In an effort to condense my search in the code base what key words would you suggest for a suitable EA. The more I think about it the more I like the idea of having control over the "Margin Call" WITHOUT losing it's 10% safety net. I'm thinking "Margin Call" when start balance is reached - NEVER going negative !

Searched for Margin Call EA and found this https://www.mql5.com/en/blogs/post/7975 But insufficient information to know what it is about . . . Any thought's ?
 
Another idea I have just had . . . Show "Margin Level" as a horizontal line on the chart then I can drag my Armageddon SL to it

Sure somebody else MUST have had the same idea as me . . . But where ?

Any coders reading want to give me a price to create my idea ?

Private message me 🙂
.
 
In an effort to condense my search in the code base what key words would you suggest for a suitable EA. The more I think about it the more I like the idea of having control over the "Margin Call" WITHOUT losing it's 10% safety net. I'm thinking "Margin Call" when start balance is reached - NEVER going negative !
//-----

hey maverick... in a limited manner you could always use accountequity()... such as....

MQL4:
double openingbalance = 200.00;
 
if(AccountEquity()<(openingbalance*1.1) {CloseAll();}

by limited manner I mean that you would obviously not be able to use that on the accounts first trade..... some equity increase will have to occur first ......

there might not be a safer way than to set a stoploss at the outset....h