Re: Close all Script
I still have not changed anything in the portfolio
use still 0.01 lot
for those interested, the chart update
Create and Test Forex Strategies
You are not logged in. Please login or register.
Forex Software → Expert Advisor Studio → Close all Script
I still have not changed anything in the portfolio
use still 0.01 lot
for those interested, the chart update
Is there anyway to further this code by making it close all trades when % of account balance is won or lost?
I’ve been trying but haven’t had much success.
I’m thinking if we could do this it would be so powerful as it is scalable with your account size as well avoiding those nasty drawdown.
Ie close all trades when account balance + open orders profit = 5%
Close all trades when account balance + open orders profit = -5%
that sounds interesting
is there anyone here who could provide that as a code that we can then insert?
Is there anyway to further this code by making it close all trades when % of account balance is won or lost?
I’ve been trying but haven’t had much success.
I’m thinking if we could do this it would be so powerful as it is scalable with your account size as well avoiding those nasty drawdown.
Ie close all trades when account balance + open orders profit = 5%
Close all trades when account balance + open orders profit = -5%
i have that running.
input double TPPercentwin = 0; // Close all winner x% reached of AccountBalance
input double TPPercentloss = 0; // Close all losses x% reached of AccountBalance
in OnTick add this:
if(Open_Orders_Profit() >= AccountBalance()*(TPPercentwin/100)
{
CloseAllPositions();
}
if(Open_Orders_Profit() <= AccountBalance()*(TPPercentloss/100)
{
CloseAllPositions();
}
Check this out.
Hi, would it possible for anyone to put all the added code into a ea studio mq4?
where it´s supposed to be..
close all script and this one
thanks
Michael1 wrote:Is there anyway to further this code by making it close all trades when % of account balance is won or lost?
I’ve been trying but haven’t had much success.
I’m thinking if we could do this it would be so powerful as it is scalable with your account size as well avoiding those nasty drawdown.
Ie close all trades when account balance + open orders profit = 5%
Close all trades when account balance + open orders profit = -5%i have that running.
input double TPPercentwin = 0; // Close all winner x% reached of AccountBalance input double TPPercentloss = 0; // Close all losses x% reached of AccountBalance
in OnTick add this:
if(Open_Orders_Profit() >= AccountBalance()*(TPPercentwin/100) { CloseAllPositions(); }
if(Open_Orders_Profit() <= AccountBalance()*(TPPercentloss/100) { CloseAllPositions(); }
Check this out.
yes, please.
thanks Rougey, but i have xx errors in code, when i put it inside.
can you help?
yes, please.
thanks Rougey, but i have xx errors in code, when i put it inside.
can you help?
i have forget to pu an ) at the end so it have to look like this
if(Open_Orders_Profit() >= AccountBalance()*(TPPercentwin/100))
did you working now full automatic or semi?
Did you use the percent profit close function
did you working now full automatic or semi?
Did you use the percent profit close function
Till now i have use semi. (my Experience with that last 8 weeks is, i make semi on support or ressistence zones, when we can make this automated, i think the portfolio ea can run without semi. But for that, i have no idea to coding). The percent close i have not tested. But i will it test soon
so we have to code the daily pivot points. what do you mean with support and resistance. if it go to support zone close?? also resistance zone close? so if pivot point reach close?
ok, so I have google translator use, I'm only perfect in German
So 8 weeks ago I did it like this.
15 minutes running the generator on EurUsd, no optimization, no Monte Carlo, nothing at all.
Simply create a portfolio EA, and load into MT4.
Beginning 8 am German time, he opens the trades. Then I watch the support and resistance zones, I am not sure if these are the pivot points, have bought an old EA years ago, which records me always. After that I judge, probably the pivot points.
I always decide for feeling if I close everything shortly before or at the breakthrough, I observe the strength of EurUsd. With little strength I close shortly before and with great strength I break through and close afterwards.
After that, I turn off auto-cycling for the rest of the day and let it restart early at 8am.
This results in daily between 1-3% profit with minimal DD, sometimes even after 30 minutes the trading day is over, because I have reached 3%.
I think if you could tie this to Pivot, that could be great. But always with the rule, once goal achieved in the day, end for the day.
I have tried everything possible with EAStudio for several years now, but I have never been able to achieve lasting success. Even after mega strong rules with Monte Carlo, Multi Market etc.
FSB has much more stable EA after development than EAStudio
But: This system here is completely relaxing, because of minimal DD for me and it basically throws off daily profits. very rarely have I finished the trading day with minimal loss.
Even on extreme trend days due to news, I have made either good profit or minimal loss.
You can say it's actually just random. This shows the profit share of 58%. But this is also related to the fact that the profit target everything is closed.
The market changes so often at M5. With the daily restart you seem to reach again and again a kind of reset.
I am totally thrilled and live totally quiet with these trades. It's crazy I know .... I like it
I have been playing around with this idea for a few weeks. Currently I’m running like this:
Generate over 4000 bars for a few hours and use optimisation and Monte Carlo, I generate about 1000 strategies or so and stress test till I have 100 of the best using Monte Carlo.
All strategies have there own SL but not TP.
I then set a % of account balance TP and SL of 1%
I am getting good results and I am quick to prune the port of bad strategies (I run for a week then over the weekend prune bad strategies)
However! What I have found is that when the market say takes a dump and rises very quickly I am left with a huge amount of strategies all opening positions in the same direction which leaves me with huge exposure. This is where the SL of account balance comes in.
However say market dumps I now have a large number of open positions, markets flattens and begins reverse I get stopped out and all positions close with a 1% loss to my account. Happy days.
But next bar opening the strategies open again in all in the direction and the same thing happens. This is because all indicators are thrown to extremes because of high volitility in previous bars.
Which brings me to my next idea. How can we code into the portfolio that if the account protection SL is reached the strategies cannot open and new positions for X number of bars or for X number of hours/minutes etc?
10 weeks are over, still no change and still great results. Photo as attachment
88 Percent without all Tools, only Portfolio after 15 Minutes search in Generator
Hi rantampla
That's amazing, mind to share some tips? especially about the acceptance criteria, indicators choice and historical data length.
Hi Yonkuro.
You will laugh.
No special settings. 6 months historical data. SL between 10 and 50 pips, but only possibly.
tp between 10 and 50 pips, but only possibly.
15 minutes generator, no Monte Carlo, no WF, nothing. Only portfolio.
But, that most important:
Early 8 o'clock German time starts, and if a S / R level or $ 20 profit at 0.01 are reached, I will close everything and do nothing more that day.
Indicators are the default and no acceptance criteria
So it's a semi-automatic trading.
but I do not care how, main thing i can make money
Wow, I barely believe it, so no optimizer?
15 Minutes generator, do you mean M15 TF?
I was inspired by miroslav his first video of the portfolio eas. he had run random strategies on m1 and was 500 usd in the plus.
I thought the generator ran for 15 minutes and was looking for strategies. timeframe I had used M5
Forex Software → Expert Advisor Studio → Close all Script
Powered by PunBB, supported by Informer Technologies, Inc.