forex software

Create and Test Forex Strategies

forex software

Skip to forum content

Forex Software

Create and Test Forex Strategies

You are not logged in. Please login or register.


(Page 2 of 2)

Forex Software → Expert Advisor Studio → Close all Script

Pages Previous 1 2

You must login or register to post a reply

RSS topic feed

Posts: 26 to 43 of 43

26 (edited by rantampla 2019-05-22 15:58:54)

Re: Close all Script

I still have not changed anything in the portfolio
use still 0.01 lot
for those interested, the chart update

Post's attachments

Portfolio100-nach 7 Wochen.png 118.56 kb, 1 downloads since 2019-05-22 

You don't have the permssions to download the attachments of this post.

Re: Close all Script

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%

Re: Close all Script

that sounds interesting
is there anyone here who could provide that as a code that we can then insert?

29 (edited by Roughey 2019-05-23 13:35:32)

Re: Close all Script

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.

Re: Close all Script

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




Roughey wrote:
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.

Re: Close all Script

yes, please.
thanks Rougey, but i have xx errors in code, when i put it inside.
can you help? smile

32 (edited by Roughey 2019-05-24 21:02:35)

Re: Close all Script

rantampla wrote:

yes, please.
thanks Rougey, but i have xx errors in code, when i put it inside.
can you help? smile

i have forget to pu an ) at the end so it have to look like this

if(Open_Orders_Profit() >= AccountBalance()*(TPPercentwin/100))

33 (edited by rantampla 2019-05-31 09:41:31)

Re: Close all Script

Thank you Roughey, small time last days...i hope it work now smile

My Account have now 8 weeks tradetime and 70 Percent Profit with max. 18 percent DD.


https://i.postimg.cc/crSCxyWw/fsb.png

Re: Close all Script

did you working now full automatic or semi?

Did you use the percent profit close function

Re: Close all Script

Roughey wrote:

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 smile

Re: Close all Script

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?

Re: Close all Script

ok, so I have google translator use, I'm only perfect in German smile
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 smile

Re: Close all Script

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?

39 (edited by rantampla 2019-06-14 08:30:40)

Re: Close all Script

10 weeks are over, still no change and still great results. Photo as attachment smile



https://i.postimg.cc/LnLRD8Lp/14-06-2019.png


88 Percent without all Tools, only Portfolio after 15 Minutes search in Generator big_smile

40 (edited by yonkuro 2019-06-14 11:11:40)

Re: Close all Script

rantampla wrote:

10 weeks are over, still no change and still great results. Photo as attachment smile



https://i.postimg.cc/LnLRD8Lp/14-06-2019.png


88 Percent without all Tools, only Portfolio after 15 Minutes search in Generator big_smile

Hi rantampla

That's amazing, mind to share some tips? especially about the acceptance criteria, indicators choice and historical data length.

do or do not there is no try

41 (edited by rantampla 2019-06-14 12:17:38)

Re: Close all Script

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 smile

Re: Close all Script

Wow, I barely believe it, so no optimizer?

15 Minutes generator, do you mean M15 TF?

do or do not there is no try

Re: Close all Script

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

Posts: 26 to 43 of 43

Pages Previous 1 2

You must login or register to post a reply

Forex Software → Expert Advisor Studio → Close all Script

Similar topics in this forum