Piplite v1.0 - page 12

 

30% loss

There is no stop loss. Piplite trades till it's in profit or equity protection is hit, there is no in between. The only other explanation is your broker closing the trades. There have been instances of brokers closing trades. Usually it's a margin issue.

v/r

kwkee:
Hi Iron,

Thanks for the detailed explanation.

I would like to clarify the above however. What happen to me is that Piplite 1.5 actually CLOSE OUT the trades resulting in a permanent 30% loss. It is not a DD and neither did I close out the trades myself.

So I was wondering if there is some sort of stop loss built into PipLite that once hit, it will closes all trades by itself.
 

New Version

All,

New Version is here. Here are the fixes:

Buy and Sell arrows fixed

Fisher indicator removed

Broker Decimal Set removed...EA autosets

Comment section has aRSI and MARSI

Menu reworked...less things to set

MARSI fixed and working well

New set file on first post is for GBPUSD and you need to select short only! Yes, I found out that Piplite is an awesome directional only trader. The backtest a couple of posts back confirms this. None of the new filters worked on GBPUSD without hitting EP however, directional trading worked swimmingly! Go for it!

Backtesters, concentrate on changing the aRSI settings. Periods can be anything but 60 is best. I start with bars (10-30) and once I find a good range, I change the trigger (.005-.01 or 0). 0 tell ATR autotrigger the correct entry. Apply your selected filter and go to town. MARSI cross confirms aRSI if you desire to use it. GBPCHF, EURCHF, CHFJPY and EURGBP still need backtesting.

Happy Trading

v/r

 

According to the equity protection code in version 1.5, it can close out at 30% loss if you have it set to FloatPercent at 50% loss and also have Portion set to 3.

First it divides the Balance into 3 then multiplies that by 50% which actually closes trades when there is a 17% loss not 50%. If that number is reached then it will close trades in that currency. After the balance is now 17% less is may close trades in other currencys depending on how bad off they are.

Let me give an example:

Say you are trading EURCHF, EURGBP, and GBPUSD on a $10,000 account and you have the EA set to protect the equity when FloatPercent is set at 50% and Portion is set to 3. First divide $10,000 by 3 and you get $3,333 then 50% of that is $1,666. $1,666 is how much any single currrency is allowed to lose before protection kicks in and closes trades for that currency. If that happens then your new balance is now $8,334. Divide that by 3 and multiply by 50% and your new protection is at $1,389. If another currency is lossing by that much then Equity Protection will be kicked in for that currency as well and your new balance is $6945 which is a total loss of about 30% from your starting balance.

Of coarse when you are backtesting you are only trading one currency and portion is set to 1 which means that during backtest the currency actually losses 50% before it is closed out by the EA so the results look much different than when trading 3 currencies and portion set to 3 which only allows a 17% loss.

I'm not sure if that is how the code was intended to work but this is how it is written below.

if(UseEquityProtection) {

double PortionBalance, PortionEquity;

TotalProfit = NormalizeDouble(TotalProfit,0);

PortionBalance = NormalizeDouble(AccountBalance()/Portion,0);

PortionEquity = NormalizeDouble(PortionBalance + TotalProfit,0);

if ( PortionBalance - PortionEquity >= (PortionBalance * FloatPercent/100) )

ExitAllTrades(Red,"Max P/L Reached");

}

 
lron:
There is no stop loss. Piplite trades till it's in profit or equity protection is hit, there is no in between. The only other explanation is your broker closing the trades. There have been instances of brokers closing trades. Usually it's a margin issue. v/r

Iron, it is a demo account. So I don't suppose the broker will interfere, unless it is margin issue or the maximum of 50 lots is breached and the server closes the trade.

Let me check again if the equity protection has been hit. At $1615 and Portion set to 2 for each pair, means each pair has an allocation of $807.50. I set the equity protection at 40% so a loss of $323 on any pair will have the equity protection kicked in. I don't think it hit the loss of 40% yet.

I will try to post up the forward testing statements tonight.

 
jlust286:
According to the equity protection code in version 1.5, it can close out at 30% loss if you have it set to FloatPercent at 50% loss and also have Portion set to 3.

First it divides the Balance into 3 then multiplies that by 50% which actually closes trades when there is a 17% loss not 50%. If that number is reached then it will close trades in that currency. After the balance is now 17% less is may close trades in other currencys depending on how bad off they are.

Let me give an example:

Say you are trading EURCHF, EURGBP, and GBPUSD on a $10,000 account and you have the EA set to protect the equity when FloatPercent is set at 50% and Portion is set to 3. First divide $10,000 by 3 and you get $3,333 then 50% of that is $1,666. $1,666 is how much any single currrency is allowed to lose before protection kicks in and closes trades for that currency. If that happens then your new balance is now $8,334. Divide that by 3 and multiply by 50% and your new protection is at $1,389. If another currency is lossing by that much then Equity Protection will be kicked in for that currency as well and your new balance is $6945 which is a total loss of about 30% from your starting balance.

Ahh.....I think this could be the case.

You could be right here. I have two pairs running, and after one pair closes with a a loss (maybe equity protection hit), I saw that the other pair started to close out not long after as well bringing the total of losses close to 30%

So maybe it is safer to run with a single pair only even on a nano-lot account

 

Portion Control

As always, I usually don't have all the information while trying to answer the 30% question.

Portion control was designed to protect the pair you trade from other pairs that your are trading. It effectively divides your account into portions. When you do this, you must understand that you portion your initial account balance and it's that balance that is used in the equity protection.

Now, I assume, right now you are going back and doing the math and seeing that the 30% is 30% of your total account yet it's 50% of your portioned account.

This is how Piplite protections work. What we really need to work on is better set files and better uses of the new filters.

v/r

 
lron:
As always, I usually don't have all the information while trying to answer the 30% question.

Portion control was designed to protect the pair you trade from other pairs that your are trading. It effectively divides your account into portions. When you do this, you must understand that you portion your initial account balance and it's that balance that is used in the equity protection.

Now, I assume, right now you are going back and doing the math and seeing that the 30% is 30% of your total account yet it's 50% of your portioned account.

This is how Piplite protections work. What we really need to work on is better set files and better uses of the new filters.

v/r

Iron,

Thanks for your clarification.

To understand better on how Portion works, allow me to ask you this.

Let's say the initial account balance is $2000. Equity Protection = 50% and Portion = 2

Now, the account has grown to $3000.

So what is the $ value when equity protection kicks in? Is it at $500 or $750?

 

Portion always uses the latest and greatest balance. If you leave $2000 as your initial balance, that's figure used for "hard stop". Equity Protection will always use 50% of the portion you give it. As your account balance grows it will do this:

Hmmm, account balance is now $3000 and he has portion control of 2 on this pair. I will used $1500 as the amount to trade with. If my P/L drops below 50% of $1500, I will close all my trades so I don't lose anymore! My account balance is now $2250, should I keep trading? Let's see...

He still has $2000 as his initial balance and my account balance is $2250 so yup, I can keep trading! My new portion balance to look at is half of $2250 or $1125.

By the way, Portion control controls your lot size base on it's portion share. Portion control is powerful control over how you want the EA to trade with your account. Heck, you give it a portion of 10. On a $2500 micro account, it will tell the EA that you only have $250 to play with on that pair and if you set 50% EP, you will only accept a loss of -$125. You see?

v/r

kwkee:
Iron,

Thanks for your clarification.

To understand better on how Portion works, allow me to ask you this.

Let's say the initial account balance is $2000. Equity Protection = 50% and Portion = 2

Now, the account has grown to $3000.

So what is the $ value when equity protection kicks in? Is it at $500 or $750?
 

Direction Trading

All,

I have had questions on direction trading. MT4 allows you to trade both long and short. When you place an EA on a chart, a window will pop up so you can set the menu items. This is where you load your set files and check your EAs settings. On the other tab there is a bounty of info as well.

One trick I alway use is to NOT allow live trading initially. I will uncheck that box and when I select OK, I will get a frowny face on my chart BUT I will get an EA overlay (if it's programed into the EA) that tells me good stuff, like starting lot size. If I am happy with that, I will hit F7 on the chart and the menu window will pop back up and then I will check the box to allow live trading.

Additionally, in that same window is a drop down menu box on how you want to trade. Click the attachment picture and you will see what I mean. You can select whatever "direction" you want to trade!

So, with this new version of Piplite and the GBPUSD set file, select short only! Piplite now rock the GBPUSD in the short direction!

Happy Trading

v/r

Files:
 

Idea for improvement to EA

So, with this new version of Piplite and the GBPUSD set file, select short only! Piplite now rock the GBPUSD in the short direction!

Iron and All,

I think you are all ready for my next idea to improve this EA. It will take a little coding but it will be worth it.

Instead of selecting SHORT ONLY, why not have RSI over MA determine the overall trend. Here is how we do it.

We need four vars added to the EA:

TradeTrendOnly True/False

MA Period

RSI Period

TimeframeSelect

Before a new GRID starts, the EA checks RSI-MA Cross on which chart (Say Monthly) we want to determine overall Trend. Using the GBPUSD as an example, On the Monthly, it would be Short, on the Weekly it would be LONG. From then on until the close of the Grid it will only trade LONG or SHORT depending on the overall trend. This would make the EA much safer as we would be avoiding trading against the overall trend.

In my opinion, the GBPUSD should go on the Weekly chart because it is so trendy and the trends can change quickly. However, on the EURCHF and EURGBP, we would probably set that to the monthly charts.

As you can see on the screenshots, on the monthly chart, the GBPUSD is saying SELL but on the Weekly chart, it is saying BUY. The weekly could be indicating a reversal. Weekly will find the reversal quicker than the Monthly will.

Thus, what we are doing is turning this EA into a Multi-timeframe EA. The RSI/MA Cross on the Overall trend (Monthly or Weekly) and then the RSI/MA Cross on Hourly trend for additional orders.

This should reduce risk greatly and make for a much safer EA.

Could any coder add this to the EA?

Files: