Gamestudio Links
Zorro Links
Newest Posts
How is this possible ? winning percentage 100%
by chsmac85
Today at 14:15
Asset capacity
by tuuPaul
Today at 13:48
New Zorro version 1.96
by jcl
Today at 13:13
Next contest?
by Michael_Schwarz
Today at 10:33
Help! 1.88.6 Crashes <5 minutes after clicking Trade!
by jcl
Today at 10:28
WFO
by jcl
Today at 10:27
TA-Lib not updated
by jcl
Today at 10:24
AUM Magazine
Latest Screens
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Evonet Beta v1.0 : Online Project Development Template
Lake scene
Who's Online
16 registered (Ayumi, MatPed, alibaba, kvm, chsmac85, KadigunFx, CocaCola, HellThunder, 3 invisible), 462 Guests and 7 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
fandi, Deedee, avgtrader, aventador, gokhanuck
18103 Registered Users
Topic Options
Rate This Topic
#474705 - 10/31/18 10:11 CCI ,200 SMA & LinearRegression Slope Pullback Strategy
Materz Offline
Newbie

Registered: 12/05/17
Posts: 19
Dear All,
I have the following problem with my strategy .
1. I did developed a strategy [ Check below ], the strategy opens only one asset namely USD/CHF for
about three months.

Strategy
enter long trade when the CCI is below -100 , LinearRegression_Slope is greater than 0 , Price is above 200 ZMA & T3 200 ,close when CCI is above //180,reverse is true for Sell .

the strategy opens lot size that are not understandable based on margin computations
Margin = 0.5 * OptimalF * Capital * sqrt(1 + ProfitClosed/Capital)/iNum;

a. sometimes it opens lot size of 0.01 or 0.83 [Need Support from any forum member]
b. the exit strategy is when CCI is greater that +180/-180, this does not happen
i can see from the chart USD/CHF have severally moved beyond +180 and the trade did not close.
2. Trades does not open on any asset , i have about 18 asset.[Need Support from any forum member]
a.MT4 logs does not indicate any problem pertaining to requesting coming from Zorro application.
b. Zorro console does not throw any message or error message.


function run()
{
BarPeriod =60;
LookBack=1234;
StartDate =2013;
EndDate = 2015;

set(LOGFILE);

vars price = series(priceClose());
vars adx= series(ADX(14));
var slope =LinearRegSlope(adx,14);
var iCCI =CCI(14);
var SMASlow = ZMA(price,200);
var iT3 = T3(price,200,0.7);
var Threshold = 100;
var iNum=6;
var iSlopeVal=0;
var ExitEntry=180;
Detrend=16;
Capital = 2000;
assetList("AssetsCurFxPro.csv");

while(asset(loop("SILVEREURO","GOLDEURO","PLATINUM","EUR/GBP","NZD/USD", "BTC/USD","LTC/USD","ETH/USD","BCH/USD","XRP/USD","WTI","GOLD","SILVER","EUR/USD","USD/JPY","GBP/USD","AUD/USD","EUR/JPY","USD/CHF")))

Margin = 0.5 * OptimalF * Capital * sqrt(1 + ProfitClosed/Capital)/iNum;
{
if( iCCI < -Threshold && price[0] > SMASlow && price[0] > iT3 && slope >iSlopeVal)
enterLong();
if(NumOpenLong >0 && iCCI > ExitEntry)
exitLong();
}

{

if(iCCI >Threshold && price[0] < SMASlow && price[0] < iT3 && slope <iSlopeVal)

enterShort();

if(NumOpenShort >0 && iCCI < -ExitEntry)


exitShort();
}
}

Top
#474740 - 11/02/18 19:59 Re: CCI ,200 SMA & LinearRegression Slope Pullback Strategy [Re: Materz]
OptimusPrime Offline
Newbie

Registered: 08/09/18
Posts: 26
Hi Materz:

You are assigning price and other values before you loop through any assets. If you look at the Counter Trend Trading System example in Workshop 5, you will see that price and trend values are set after we have started looping through assets.
_________________________
Thanks so much,

OptimusPrime


Top
#474817 - 11/07/18 14:21 Re: CCI ,200 SMA & LinearRegression Slope Pullback Strategy [Re: OptimusPrime]
Materz Offline
Newbie

Registered: 12/05/17
Posts: 19
Hi OptimusPrime.

I have resolved it. it exactly your solutions . is working now.

Top



Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de