You are not logged in. Log-in/Create account
|
Netiquette

EQUILLA - first aid

Page 1 of 1
Page Size10 20 30
tarcnux
Boardmail
Ignore
Access
ReplyForwardReport abuse  |   
#6 posted on 7/15/2010 at 5:33 PM
Hello,

I'm newbie working with Equila, but I already have done some good things, good to me, I think they are simple but it's only the beginning.

I want to know from everyone who can help me, with Equila, to measure the points over or under a Stop line or fibo Retracement or Pivo Points.

When the price crosses over a Stop line, for an example, the I must measure te points High and Low.

Any suggestion will be helpfull.

Thanks,
Tarcnux
dubdaddy
Boardmail
Ignore
Access
ReplyForwardReport abuse  |   
#5 posted on 11/19/2009 at 10:27 AM
i have trouble understanding why a certain piece of code i wrote does not do what i want. could somebody have a look at it, pls?
if you look at the output you can see that for the first couple of days
ActualMarketPosition=MarketPosition+Positionchange. Thats what its supposed to do. After a couple of days though, depending on the data u use, this stops to be true. Whats happening? In order for this code to function properly, pyramiding needs to be switched to yes, all.

code follows here:

Meta:
subchart(true);

Inputs:
Delay(0), PortfolioWGT(1), Vperiod(20), FPV(1000), Gearing(1),
F1(10), F2(10), F3(10), F4(10), F5(10), StopF(2);

Variables:
MPosition, ActualMarketPosition, PositionChange,
O1, O2, O3, O4, O5;

//the normalized osciallators
O1 = ((XAverage(c[Delay], 2) - XAverage(c[Delay], 6)) * F1/10) / AvgTrueRange(VPeriod);
O2 = ((XAverage(c[Delay], 4) - XAverage(c[Delay], 12)) * F2/10) / AvgTrueRange(Vperiod);
O3 = ((XAverage(c[Delay], 6) - XAverage(c[Delay], 24)) * F3/10) / AvgTrueRange(Vperiod);
O4 = ((XAverage(c[Delay], 12) - XAverage(c[Delay], 48)) * F4/10) / AvgTrueRange(Vperiod);
O5 = ((XAverage(c[Delay], 24) - XAverage(c[Delay], 96)) * F5/10) / AvgTrueRange(Vperiod);

MPosition = O1+O2+O3+O4+O5;

ActualMarketPosition = round(MPosition * (InitialCapital) / FPV, 0);
PositionChange = ActualMarketPosition - ActualMarketPosition[1];
StopF = AvgTrueRange;

//prints
Print(formatdate(date, 1), MarketPosition, ActualMarketPosition, CurrentContracts * MarketPosition, PositionChange);

//if flat
If MarketPosition = 0 and PositionChange >= 0 then begin
Buy PositionChange Contracts next bar at open;
Print("0Buy", PositionChange);
end;

If MarketPosition = 0 and PositionChange < 0 then begin
Short abs(PositionChange) Contracts next bar at open;
Print("0Short", PositionChange);
end;

//if long
If MarketPosition = 1 and PositionChange >= 0 then begin
Buy PositionChange Contracts next bar at open;
Print("1Buy", PositionChange);
end;

If MarketPosition = 1 and PositionChange < 0 then begin
sell abs(PositionChange) Contracts next bar at open;
Print("1Sell", PositionChange);
end;


//if short
If MarketPosition = -1 and PositionChange >= 0 then begin
cover PositionChange Contracts next bar at open;
Print("-1Cover", PositionChange);
end;

If MarketPosition = -1 and PositionChange < 0 then begin
Short abs(PositionChange) Contracts next bar at open;
Print("-1Short", PositionChange);
end;

//SetStopContract();
//SetStopLoss(StopF * AvgTrueRange);

//Print(formatdate(date, 1), MarketPosition, ActualMarketPosition, CurrentContracts * MarketPosition, PositionChange);
//Print(equity, initialcapital, contracts);

Drawline(O1);
Drawline(O2);
Drawline(O3);
Drawline(O4);
Drawline(O5);

Drawline(Actualmarketposition, "Positionsize", 1,3);

DrawForest(CurrentContracts * MarketPosition, 0);
Bucuntus
Boardmail
Ignore
Access
ReplyForwardReport abuse  |   
#4 posted on 9/10/2009 at 9:13 AM
@huskyboy (#3)
Yes, but COG (Center of Gravity) is not a band.
 
huskyboy
Boardmail
Ignore
Access
ReplyForwardReport abuse  |   
#3 posted on 8/24/2009 at 8:34 PM
IS IT POSSIBLE TO PUT ON THE COG BANDS ON THE CHARTS
THANKS
tso010109
Boardmail
Ignore
Access
ReplyForwardReport abuse  |   
#2 posted on 2/8/2009 at 7:51 PM
Hello,

currently I use "Buy this Bar on Close" in a script,
because I'd like to buy Knock Outs based on Close at
the evening directly.
But my strategy (my first one) shows very bad entry signals, so I'll try to implement some price limit based on a retracement for some days:

if ... then
begin
price = Close * (1-0,38) // 38% retracement
Buy Next Bar at my_price;
end;

Will this work?
I think, that the "Next Bar" means exactly the "bar next day".
But I also want to buy, if the retracement is hit for
e.g. next 3 days.

Is there any help in Equilla for this?
Or do I have to use a counter:

counter(NumericStatic), price(NumericStatic);

if ... then begin
price = Close * (1-0,38) // 38% retracement
counter = 3;
end;
if counter > 0 then begin
counter = counter-1;
if Close <= price then Buy this Bar at price;
end;

Thank you for your help.

Frank
Tradesignal
Boardmail
Ignore
Access
ReplyForwardReport abuse  |   
#1 posted on 9/22/2008 at 5:21 PM
ask everything
Page 1 of 1
© 2000-2010 Tradesignal GmbH | AGB (Terms of Use) | Privacy | Data from TeleTrader Software AG. European commodities data from ICE. All quotes are covered by the regulations of their respective exchange; quotes are delayed by at least 15 minutes.