Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (VoroneTZ, monk12, Quad), 829 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
CCI ,200 SMA & LinearRegression Slope Pullback Strategy #474705
10/31/18 09:11
10/31/18 09:11
Joined: Dec 2017
Posts: 19
M
Materz Offline OP
Newbie
Materz  Offline OP
Newbie
M

Joined: Dec 2017
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();
}
}

Re: CCI ,200 SMA & LinearRegression Slope Pullback Strategy [Re: Materz] #474740
11/02/18 18:59
11/02/18 18:59
Joined: Aug 2018
Posts: 98
O
OptimusPrime Offline
Junior Member
OptimusPrime  Offline
Junior Member
O

Joined: Aug 2018
Posts: 98
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

Re: CCI ,200 SMA & LinearRegression Slope Pullback Strategy [Re: OptimusPrime] #474817
11/07/18 13:21
11/07/18 13:21
Joined: Dec 2017
Posts: 19
M
Materz Offline OP
Newbie
Materz  Offline OP
Newbie
M

Joined: Dec 2017
Posts: 19
Hi OptimusPrime.

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


Moderated by  Petra 

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

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

Powered by UBB.threads™ PHP Forum Software 7.7.1