Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (vicknick, AndrewAMD), 1,292 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Plotting indicators #412995
12/06/12 03:52
12/06/12 03:52
Joined: Dec 2012
Posts: 14
P
Pipinator Offline OP
Newbie
Pipinator  Offline OP
Newbie
P

Joined: Dec 2012
Posts: 14
Hello -

I hijacked the code from the tutorial and created a lowpass crossover trigger. I have many questions however what I would really like is better resolution when I plot the indicators, so I can see the trigger. Can I using the results button or do I need to log the data an plot in a different package.

Thanks!

T

BTW.. Lots of promise it would seem on this crossover. 213% and it is not trading the tops which I am very happy with.

function run()
{
set(PARAMETERS+FACTORS); // generate and use optimized parameters
BarPeriod = 240; // 4 hour bars
LookBack = 500; // needed for Fisher()
NumWFOCycles = 10; // activate WFO
NumBarCycles = 4; // 4 times oversampling

var *Price = series(price());
var *Trend = series(LowPass(Price,optimize(250,100,1000)));
var *TrendShort = series(LowPass(Price,30));
var *TrendLong = series(LowPass(Price,50));
var ma = MovingAverage(Price,200,MAType_SMA);
vars Signals = series(0);

Stop = optimize(4,2,8) * ATR(100);

if(ReTrain) {
UpdateDays = 30; // reload new price data from the server every 30 days
SelectWFO = -1; // select the last cycle for re-optimization
}

// portfolio loop
while(asset(loop("EUR/USD")))
{
// set up the margin
if(OptimalFLong > 0 and OptimalFShort > 0)
{
Margin = 100*(OptimalFLong+OptimalFShort);
//Margin += (WinTotal-LossTotal)/8 * (OptimalFLong+OptimalFShort);

Trail = 2*ATR(100);
TimeExit = 4;

if (crossOver(TrendShort,TrendLong)){
if(Sum(Signals+1,3) == 0)
enterLong();
Signals[0] = 1;
}
if (crossUnder(TrendShort,TrendLong)){
if(Sum(Signals+1,3) == 0)
enterShort();
Signals[0] = 1;
}

}
}

plot("Fast", *TrendShort, NEW, RED);
plot("Slow", *TrendLong, 0, BLUE);
PlotWidth = 800;
PlotHeight1 = 600;

}

Re: Plotting indicators [Re: Pipinator] #413000
12/06/12 07:23
12/06/12 07:23
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
You can at first set a higher PlotWidth, such as 4000.

There's a limit, as you can not have extremely large images. For an even higher resolution, zoom in. In the code for the Workshop 4 lesson there's an out-commented part for zooming to a certain date.

Re: Plotting indicators [Re: jcl] #413016
12/06/12 13:47
12/06/12 13:47
Joined: Dec 2012
Posts: 14
P
Pipinator Offline OP
Newbie
Pipinator  Offline OP
Newbie
P

Joined: Dec 2012
Posts: 14
Thank you!

Re: Plotting indicators [Re: Pipinator] #413079
12/07/12 16:13
12/07/12 16:13
Joined: Nov 2012
Posts: 209
S
SFF Offline
Member
SFF  Offline
Member
S

Joined: Nov 2012
Posts: 209
Hi Pipinator,

When I clicked your script which I saved as lowpass.c I got those error massages.


Can't open lowpass.fac
Can't open lowpass_1.par

How can I test it successfully?

Thanks in advance.


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