hi,
since you check for the positionsize this should
not happen. Each time the active chart is updated it will send this order
again. Once it is executed the positionsize should change to zero. So it seems
to me that two orders (or chart refreshes) follow eachother before the
hi,
your arrays need to have the same length and the
elements of the arrays need to have the same date when you want to compare
them.
So when you are for instance working in the daily
time frame and you want to compare a timeseries in this timeframe with a
timeseries in the monthly
]ps.com,
"Edward Pottasch" empottasch@... wrote:
hi, your arrays need to have the same length and the elements
of the arrays need to have the same date when you want to compare
them. So when you are for instance working in the daily time
frame and you want to compare a
thanks for this upgrade,
regards, Ed
- Original Message -
From: Tomasz Janeczko [EMAIL PROTECTED]
To: amibroker@yahoogroups.com
Sent: Monday, October 09, 2006 5:47 PM
Subject: [amibroker] New Interactive Brokers plugin 1.6.8
Hello,
hi,
you can do it like that but in Amibroker you can
also work with arrays. So for instance:
constraint1 = ...;
constraint2 = ...;
constraint1 and 2 are both arrays that contain "0"
and "1".
allconstraints = constraint1 AND
constraint2;
now allconstraints is an array that
no IB plugin should be 1.6.8
regards, Ed
- Original Message -
From:
cstrader
To: amibroker@yahoogroups.com
Sent: Tuesday, November 07, 2006 5:46
PM
Subject: Re: [amibroker] : Invalid
symbol
Well my IB plugin is 1.6.3 and AB is 4.870So that seems
hi,
the idea of this piece of code was that from a
chart on the screen you mark some pattern you want to find within other stocks /
symbolsusing the markers. Then this "pattern" or few bars you have marked
is correlated with symbols in a list. The correlation is just a simple least
mean
hi,
i am looking for historical intraday (1-minute data O-H-L-C-V) for US stocks
reaching back at least 5 years. Preferably a data provider that also provides
backadjusted historical data for futures. I am looking into
http://www.tickdata.com/index.html currently and it seems pretty easy to
here is maybe what you need:
http://www.amibroker.com/guide/w_impwizard.html
rgds, Ed
- Original Message -
From: Amon Ra
To: amibroker@yahoogroups.com
Sent: Wednesday, December 13, 2006 5:17 PM
Subject: Re: [amibroker] Import data
I attached the import format for
hi,
I believe you are getting close to the area of redundant signals or multiple
postions. There are a lot of options to handle multiple positions within 1
symbol in Amibroker. On a portfolio level this is still on the to-do list I
believe.
For starters have a look here:
I think that one only can hope for technical help within the group and maybe
get some ideas from code that is posted in the library or posted within the
Amibroker groups that can trigger an idea. Someone mentioned Dimitris Tsokakis
who often posted very interesting code. Here is some of his
hi,
you will need the custom backtester, see e.g.
http://www.amibroker.com/guide/a_custombacktest.html
http://www.amibroker.com/docs/Houston2.pdf
you will need to run code that interacts with the backtest. Results of the
backtest is stored in an object and through methods you can read these
hi,
did anyone by any chance write some code enabling a limit to the amount of
stocks bought in any 1 sector when using a portfolio type system? I use a
counter trend system and I am kind of loaded with oil stocks at the moment. I
want to limit this to say 25%.
I guess this can only be
regards,
Tomasz Janeczko
amibroker.com
- Original Message -
From: Edward Pottasch
To: amibroker@yahoogroups.com
Sent: Thursday, January 11, 2007 3:23 PM
Subject: [amibroker] portfolio backtest limiting sectors
hi,
did anyone by any chance write some code
Message---
From: Edward Pottasch [EMAIL PROTECTED]
Subject: [amibroker] portfolio backtest limiting sectors
Sent: 11 Jan '07 20:23
hi,
did anyone by any chance write some code enabling a limit to the amount
of stocks bought in any 1 sector when using a portfolio type
hi,
what is the reason for these hard bounces? I have them as well. However when I
set the Email Spam Security Off, of my McAfee security center I did not
-yet- have any bounces. I thought the reason was on my side
regards, Ed
- Original Message -
From: Keith McCombs
- Original Message -
From: Yuki Taga
To: Edward Pottasch
Sent: Sunday, January 14, 2007 10:56 AM
Subject: Re: [amibroker] Another Hard Bounce
Hi Ed,
Sunday, January 14, 2007, 5:50:03 PM, you wrote:
EP hi,
EP what is the reason for these hard bounces? I have them as well
hi,
below your setup as I see it (see also example chart):
TimeFrameSet( inWeekly );
MA14_Weekly = MA( Close, 14 );
TimeFrameRestore();
TimeFrameSet( inDaily );
MA14_Daily = MA( Close, 14 );
TimeFrameRestore();
Buy=Cross(Close,MA14_Daily) AND Close TimeFrameExpand( MA14_Weekly,
better to make it completely independent of the timeframe you are in like:
TimeFrameSet( inWeekly );
MA14_Weekly = MA( Close, 14 );
TimeFrameRestore();
TimeFrameSet( inDaily );
MA14_Daily = MA( Close, 14 );
TimeFrameRestore();
Buy=Cross(Close,TimeFrameExpand( MA14_Daily, inDaily )) AND
Eric,
point is that if you are in the Daily timeframe you want the MA14_Weekly array
to be expanded to the daily timeframe.
This is why I added in the second Email:
Buy=Cross(Close,TimeFrameExpand( MA14_Daily, inDaily )) AND Close
TimeFrameExpand( MA14_Weekly, inWeekly );
Here you see I
one way to do this would be:
yourArray = IIF(signal1,C,Null);
rgds, Ed
- Original Message -
From: Jerry Laster
To: amibroker@yahoogroups.com
Sent: Monday, January 29, 2007 9:09 PM
Subject: [amibroker] Re: Creating Arrays
Yes, ma, c, H, etc. are built-in arrays. But I
can be done as follows:
// buy entry rules
period = 8;
ADXR = ( ADX( period ) + Ref( ADX( period ), -1 * period ) )/2;
//ADXR = ADX( period);
Buy = Cross(PDI( period),MDI( period )) AND BarsSince(ADXR 25) = 10;
BuyPrice = Close;
// chart
SetChartOptions(0, chartShowDates);
Message
From: Edward Pottasch [EMAIL PROTECTED]
To: amibroker@yahoogroups.com
Sent: Tuesday, January 30, 2007 4:44:25 AM
Subject: Re: [amibroker] DMI Cross then wait for ADXR 25
can be done as follows:
// buy entry rules
period = 8;
ADXR = ( ADX( period ) + Ref( ADX
hi,
I import a list of symbols each day into Amibroker which I intend to trade.
After first clearing the real time quote window of all symbols I add this new
list of symbols. Then I do backfill all RTQ symbols. Even though most of the
day I leave the symbol in the active window all other
Lester,
here some code. Have a look, it seems to work. You need to change startTime to
093000 en endTime to 103000
rgds, Ed
startTime = 153000;
EndTime = 163000;
// assign an array tt having a value 1 inside the interval
tt = IIf(TimeNum() = startTime AND TimeNum() = endTime,1,0);
//
what I would do is set
SetTradeDelays(0,0,0,0);
on top of the code. Then:
Buy = Cross( ema(close,10), ema(close,20) );
BuyPrice = O;
Buy = Ref(Buy,-1);
rgds, Ed
- Original Message -
From: dralexchambers
To: amibroker@yahoogroups.com
Sent: Sunday, February 11, 2007 4:17
: Edward Pottasch
To: amibroker@yahoogroups.com
Sent: Sunday, February 11, 2007 3:42 PM
Subject: Re: [amibroker] How To Get HHV( High, between 09:30 and 10:30 )
Lester,
here some code. Have a look, it seems to work. You need to change startTime
to 093000 en endTime to 103000
rgds
from 1-minute to 5-minute it seems to give problem,
My code from message 106471 (using plugin's functions) seems to be working ok
with different periodicities (1, 2, 3, 5, 10 ,15, 30 and 60 min charts).
Lester
--- In amibroker@yahoogroups.com, Edward Pottasch [EMAIL PROTECTED] wrote
the value of
Close.
Tnx, Lester
--- In amibroker@yahoogroups.com, Edward Pottasch [EMAIL PROTECTED] wrote:
yes Lester your code using the plugin looks good except for the fact that
the Close price line disappears when you switch away from the 1-minute time
frame or when the close price
if you have Quotes Plus you can use: GetExtraData( Shares) and multiply with
the last price.
sometime like:
Filter = GetExtraData( Shares) * C 5;
AddColumn( GetExtraData( Shares) * C, Market Cap, 1.2 );
and run explore
- Original Message -
From: Tony Lei
To:
I would think that if you display all charts in the morning there should be no
problem. I am in Europe and I open the TWS + Amibroker already before 10 a.m.
CET to prepare my day, corresponding to 4 a.m. E.T.
Best to put all symbols in the real time quote window. To open see: View -
Realtime
Drew,
you need to use TimeFrameExpand, so:
TimeFrameSet( inDaily ); // switch to daily frame
compressedClose = Close;
movingAverage = MA( Close, 2 );
firstStopPrice = BuyPrice - (mmStp *exitAtr );
postStopPrice = firstStopPrice + (stopParmB * (High - (stopParmA
*exitAtr )) - firstStopPrice );
there is this code
// This is sample formula that allows
// to open multiple, separate positions on the same symbol
// without averaging effect (i.e. each position on the same
// symbol is completely independent).
//
// Sample code is provided for trading one symbol
// Enter symbol you want
hi,
does anyone know how one can place Plotshapes as a legend in the chart. Hope
this is the right word for it. In Dutch it is called legenda meaning an
explanatory table or list of the symbols appearing on a map or chart.
I want to place various the plotshapes in the top left corner with a
;
Plot(C, , colorDarkYellow, styleCandle);
SetChartOptions(0, chartShowDates);
/*** END ***/
--- In amibroker@yahoogroups.com, Edward Pottasch [EMAIL PROTECTED] wrote:
hi,
does anyone know how one can place Plotshapes as a legend in the chart.
Hope this is the right word
cumbersome but can use plotshapes()
and plottext() to display the shape and text wherever you like. Or if the
chart is fixed' you can use plotshapes() plus the text tool.
Bill
- Original Message -
From: Edward Pottasch
To: amibroker@yahoogroups.com
Sent: Friday, March
IIF operates on an array en returns an array. So if you want to simple fill the
array position with 1 if Buy is 1 you can simple do:
position = Buy;
if you like to use the IIF operater the equivalent is:
position = IIF(Buy,1,0);
if you like to use a loop the equivalent is:
position = 0;
for
connected here. Maybe try a reboot of your system,
Ed
- Original Message -
From: david
To: amibroker@yahoogroups.com
Sent: Tuesday, March 20, 2007 12:45 PM
Subject: [amibroker] Anyone else having probs connecting to E-signal via
Amibroker ?
Funny I have been having
i believe you are supposed to do this with the custom backtester. I never
managed to use this on any useful level but maybe this code will get you ahead.
It looks at all bars and finds the signals for each bar and removes excess
signals before the signals are processed. I did not include a
like Thomas says you can get multiple signals which complicates things. In the
code below I remove all signals in the waitPeriod after you get the first
signal. Maybe a bit of a tough solution but I can only think of using a loop to
get rid of these additional signals, I would not know how to
Backtester Interface Reference Guide or How to
add user-defined metrics to backtest/optimization report. Is that something
you discovered was necessary or just good practice or for some other reason?
Where was 'fh' defined?
-- Keith
Edward Pottasch wrote:
i believe you are supposed to do
hi, what the code below does: it calculates Setup which has a 1 where ever
C closes below the BBandBOT. Then I subject the array Setup to the loop. When
inside the i loop and it finds a 1 then it enters the j loop and will
make a number of waitPeriod bars 0 that follow the 1 bar at bar i. When
and Valuewhen functions
How about something like this for the array route:
setup = cross(bbandbot( c, 20, 2), c);
wait = iif(barssince(setup) 6, 1, 0);
Bill
- Original Message -
From: Edward Pottasch
To: amibroker@yahoogroups.com
Sent: Friday, March 23, 2007 4
yes me too. Some messages I receive like 6 times ...
Ed
- Original Message -
From: J. Biran
To: amibroker@yahoogroups.com
Sent: Thursday, March 29, 2007 8:18 AM
Subject: RE: OT mutiple messages was [amibroker] Re: How to use function?
Does anybody else receive every
similar problem is solved in following example, see:
http://www.amibroker.com/guide/afl/afl_view.php?id=272
- Original Message -
From: bernardedmond01
To: amibroker@yahoogroups.com
Sent: Friday, March 30, 2007 12:42 AM
Subject: [amibroker] Profit Target
Does anyone
you need to do the following:
// set timeframe
TimeFrameSet( inDaily );
dailyHigh = H;
// restore to current time frame
TimeFrameRestore();
// expand arrays
dc = TimeFrameExpand( Ref(DailyHigh,-1), inDaily);
trigger = cross(close,dc);
rgds, Ed
- Original Message -
From:
PositionScore is not after the fact if you use e.g.
PositionScore = ref(50-RSI(15),-1);
So setting up your backtest this way the backtester will ensure by itself that
you will not enter more positions then the backtester is setup for.
As for an entry on the limit: I wrote code for that a while
for them, they just stop entering sucessful limit
orders when the equity is used up, so I don't want equity reserved. I have
heard it can be donethere must be a way !
Dave
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Edward
Pottasch
hi,
anyone have experience with the EPS data of QP?
see attached chart. From Jan-1-2007 it shows an EPS of 1.02$. The last report
of ESRX was however on Feb-8-2007 where they reported an EPS of 1.07$ This is
close enough but in the chart this number seems to be show already on
Jan-1-2007.
to use this data
safely you should shift it 1 quarter forward in my opinion or you should
somehow know the date the report was issued (QP2 does not provide this however),
rgds, Ed
- Original Message -
From: Edward Pottasch
To: amibroker@yahoogroups.com
Sent: Tuesday, April 17
of books were received by 4 members of our
group yesterday in Houston.
- Original Message -
From: Edward Pottasch
To: amibroker@yahoogroups.com
Sent: Wednesday, April 18, 2007 4:31 AM
Subject: Re: [amibroker] Quotes Plus EPS data
to answer my own question. The EPS
books out there, the inefficiency in this bit of the market
will soon be gone. (;
Best regards
Joe
- Original Message -
From: Edward Pottasch
To: amibroker@yahoogroups.com
Sent: Wednesday, April 18, 2007 7:30 AM
Subject: Re: [amibroker] Quotes Plus EPS data
code in the active window will execute at every refresh. When data comes in the
charts is refreshed. Therefor you need to work with static variables. Herman
wrote some code that you can use as an example. It can be found in the files
section of the Yahoo Amibroker-at group, see ER2 Project
hi,
I use the future bar in the setting window I to calculate which stocks to enter
and exit on the future bar. Now I am testing a system that needs to calculate
which stocks to enter on the future bar. However the exit is always on the
limit. All open positions are exited on the limit and I
try this:
SetOption(UseCustomBacktestProc, True );
if(Status(action)== actionPortfolio) {
bo = GetBacktesterObject();
bo.PreProcess();
for( bar = 0; bar BarCount; bar++ ) {
bo.processtradesignals(bar);
for( openpos = bo.GetFirstOpenPos(); openpos; openpos = bo.GetNextOpenPos() )
{
hi,
I posted some code in the amibroker-beta group few days ago. It should help
with setting up re-balancing for portfolio type systems. Have a look at that
code (balancingBasic_cbi.afl) because I am only now starting to understand this
stuff.
regards, Ed
- Original Message -
hi,
I think te code I posted in the beta group does not address your specific
problem. I have not used varset so I would not know if there is a problem here.
I posted my code here as wel and was not planning to upload in the file section
since I am fairly new to the topic myself. I just tried
hi,
this little piece of code displays output to the Interpretation window:
for(i = 1; i 1000; i *= 2 )
{
if( i 50 ) break;
printf(%f\n, i );
}
SetChartOptions(0, chartShowDates);
GraphXSpace = 5;
Plot(C,C,1,64)
output looks like:
1.00
2.00
4.00
8.00
16.00
Perhaps because you actually do not call the procedure? Did you try
changing it into
. . . .
if(exec) {
y = ts_proc(); }
--- In amibroker@yahoogroups.com, Edward Pottasch [EMAIL PROTECTED]
wrote:
hi,
this little piece of code displays output to the Interpretation
,
Jonathan
--- In amibroker@yahoogroups.com, Edward Pottasch [EMAIL PROTECTED]
wrote:
try this:
SetOption(UseCustomBacktestProc, True );
if(Status(action)== actionPortfolio) {
bo = GetBacktesterObject();
bo.PreProcess();
for( bar = 0; bar BarCount; bar
hi,
I thought I did this before but can't seem to figure it out anymore, drives me
nuts. I am analysing trade output from Interactive Brokers (my trades) and want
to compare entry / exit prices with the open price. I need to retrieve the open
price at a certain date.
Below some test code. It
found my problem. I was using Date() and shoudl be using DateNum() ...
Ed
- Original Message -
From: Edward Pottasch
To: amibroker@yahoogroups.com
Sent: Wednesday, May 16, 2007 12:12 PM
Subject: [amibroker] get price at certain bar
hi,
I thought I did
hi,
I guess this has been discussed before however I can't find it.
QP (Quotes Plus) can be downloaded on 2 computers but I want a 3-rd computer to
access the QP database on 1 of the other computers. How do I do this?
thanks, Ed
On the Quotes Plus settup program, select Database options and for data
directory, select the data bae on another computer.
- Original Message -
From: Edward Pottasch
To: amibroker@yahoogroups.com
Sent: Friday, May 18, 2007 12:54 AM
Subject: [amibroker] sharing QP database
and point to it from the other computer. So Amibroker
on the second computer sees a local QP database, but QP on the second computer
gets its data from your primary computer.
- Original Message -
From: Edward Pottasch
To: amibroker@yahoogroups.com
Sent: Friday, May 18, 2007 10
(Short,shapeDownTriangle,0),colorLightBlue, layer = 0, yposition
= ShortPrice, offset = 0 )
- Original Message -
From: Edward Pottasch
To: amibroker@yahoogroups.com
Sent: Monday, May 21, 2007 12:01 PM
Subject: [amibroker] mixed intraday / EOD, eSignal
hi,
I am doing
an ATC ticker of the daily
indicator, read in the values with foreign, then time expand each bar to match
up to your intraday bars --you will only have one number per day.
Dennis
On May 21, 2007, at 9:27 AM, Edward Pottasch wrote:
in short one normally only has a limited amount
.
From: amibroker@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of
Edward Pottasch
Sent: Tuesday, 22 May 2007 1:02 AM
To: amibroker@yahoogroups.com
Subject: Re: [amibroker] mixed intraday / EOD, eSignal
hi Dennis,
I guess
great to see these backtester enhancements. Thanks a lot. Amibroker is a
great program!
regards, Ed
- Original Message -
From: Tomasz Janeczko [EMAIL PROTECTED]
To: amibroker@yahoogroups.com
Sent: Wednesday, May 23, 2007 5:03 PM
Subject: [amibroker] AmiBroker 4.96.0 BETA released
hi,
I am struggling with this myself. It seems that discontinued symbols are
automatically emptied out. When I calculate my backtest for monday I get a
diiferent result with respect to friday because a few symbols that were giving
signals are removed (HCA, CMVT, maybe others, who knows ...).
a portfolio type system would have performed in the past. Now
you only see survivers and companies that have eaten up others.
I remember that there is an EOD data service that keeps dead symbols in the
database. Which one? Anyone know?
rgds, Ed
- Original Message -
From: Edward
CSI offers delisted stocks for 999$/yr (cost more than the listed stocks ...)
:0
- Original Message -
From: Edward Pottasch
To: amibroker@yahoogroups.com
Sent: Tuesday, May 29, 2007 8:42 AM
Subject: Re: [amibroker] Are old symbols saved in local data base?
Gary
@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of
Edward Pottasch
Sent: Tuesday, May 29, 2007 2:43 AM
To: amibroker@yahoogroups.com
Subject: Re: [amibroker] Are old symbols saved in local data base?
Gary from QP replied to my question and he says.
We don't keep dead symbols
an easy way is to use the plugin deDateTime
which can be found here:
http://www.amibroker.org/3rdparty/deDateTime.zip
read instructions how to use plugins in Amibroker. A 3 page pdf is enclosed in
the zip where you will find what you need,
rgds, Ed
- Original Message -
From:
hi,
I do not have time today and what I have written in AFL is specific for my
system but I can tell what I do. The trades of the previous day I receive in
the daily statement of IB. I copy and paste these trades into a text file.
Then you can read this textfile into Amibroker but you will
!?
and also this part with the static variables i dont understand.
maybe it would be more clear when i understand how you read this in AB.
But ok now im a little bit confused. i hope you or also the others
cuold help me to solve this.
regards
christos
--- In amibroker@yahoogroups.com, Edward
.
But ok now im a little bit confused. i hope you or also the others
cuold help me to solve this.
regards
christos
--- In amibroker@yahoogroups.com, Edward Pottasch empottasch@
wrote:
hi,
I do not have time today and what I have written in AFL is specific
me that vout is not been initialized.
So this mean something is missing.
regards
Christos
Edward Pottasch [EMAIL PROTECTED] schrieb:
hi Christos,
I run this code inside the US database. So it will look for the symbols in
this database to get the open price of ABX. This code
and for the output file this
fn = C:\\output.txt;
i send you also the summery in a wordfile with pictures.
regards
christos
Edward Pottasch [EMAIL PROTECTED] schrieb:
Cgristos,
let me check first if you have ABX in your database. It is not ADX but ABX.
I ask this because vout
Ton
my reply didn't come through it seems ... so again
yes maybe it would be a more correct way of programming but it will not solve
the fact that the code does not work for Chris. Program will not crash but give
the wrong answer, I expect. It can not recognize the symbol. It has something
to
for somebody else.
TWS auto-export Executions-file parser
regards
Chris
--- In amibroker@yahoogroups.com, Edward Pottasch [EMAIL PROTECTED]
wrote:
Ton
my reply didn't come through it seems ... so again
yes maybe it would be a more correct way of programming
Chris,
with the AFL code I can plot a few things. I show 2, the graph of the
theoretical return + real return (started tracking this on May/9, before I
tracked this stuff with Excel which cost me a lot of time. As you see my system
having a bad period hehehe ... system is flat, I am making a
this important.
ok today i could not solve my problem
i have to go to family issues :)
there is a wedding of a friend of me and maybee tomorrow
i will have a clearer mind.
regards
chris
--- In amibroker@yahoogroups.com, Edward Pottasch [EMAIL PROTECTED]
wrote:
Chris
hi,
I have different realtime AFL codes running under different tabs. Most of them
are just to check certain statistical graphs but under one tab I have AFL
running that sends the orders to the exchange.
When working under a different tab the AFL code that sends the orders doesn't
execute. I
a)
open - it can be hidden behind other charts)
Best regards,
Tomasz Janeczko
amibroker.com
- Original Message -
From: Edward Pottasch
To: amibroker@yahoogroups.com
Sent: Thursday, June 14, 2007 11:00 AM
Subject: [amibroker] RequestTimedRefresh( 1, False
hi,
I am making some test code to get a button into my RT chart window that when
pressed can do something. The code draws a rectangle on top of the normal Plot.
I want to click the left mouse button in order to execute for instance a sell
order.
GetCursorMouseButtons() I understand. But I
easier if an enhancement were made to Amibroker to
allow a Windows button to be placed directly onto a chart and then
an AFL function tied to it so that when you press the button the
function gets called.
--- In amibroker@yahoogroups.com, Edward Pottasch [EMAIL PROTECTED]
wrote:
hi
setting a dimension of an array is not possible in Amibroker. Also multi
dimensional arrays are not yet possible but I believe this is planned for.
In my opinion datastructures would be handy as well, as ofcourse the
possibility to create objects, not sure if these are planned for.
For
you
call the creation of an array with 10 elements ? Isn't that setting the
dimension of an array ? Of course not in the way we are familiar with in other
programming languages. But the final result is the same. Or ?
Ton.
- Original Message -
From: Edward Pottasch
GP,
thanks for your reply. In Yahoo you can not view attachements but if you tell
Yahoo to forward the Email to your ISP Email adres then you will receive the
attachments.
I will poste the code below.
First about your code. I will try to use it and recreate what I have done.
Second about
indeed very nice coding GP. This does more or less the same as my code:
waitPeriod = 10;
triggerPercentage = 1;
Setup = ExRemSpan(C BBandBot(C, 20, 2), waitPeriod-1);
SetupPrice = ValueWhen(Setup,H) * triggerPercentage;
Buy = Cross(H, SetupPrice) BarsSince(Setup) waitPeriod;
BuyPrice =
GP,
I believe this is because you define i = j; outside of the j loop. This is not
what I do in my code. i=j is defines within the brackets of the loop.
So if you adjust your code for that our results are the same, see below
rgds, Ed
waitPeriod = 5;
Setup2 = ExRemSpan(1, waitPeriod-1);
@yahoogroups.com, Edward Pottasch [EMAIL PROTECTED]
wrote:
GP,
I believe this is because you define i = j; outside of the j loop.
This is not what I do in my code. i=j is defines within the brackets
of the loop.
So if you adjust your code for that our results are the same, see below
GP,
since you seem pretty handy with this stuff maybe you can have a look at the
code below. I write most of my exit code using loops. Below an example how I
usually do it. In this example I code an nBar stop. Note that I let the j loop
deliberately go to j barcount since within the j loop I
ok thanks,
I was just a little curious about the code I posted yesterday. Possibly I made
some error there I am not sure. I wanted to check if I was maybe overlooking
some error and that would be a problem since I use similar coding in the system
I trade with and didn't notice any problems.
the usage of 'break' is
defined in the manual.
Thank You,
Ed Hoopes
--- In amibroker@yahoogroups.com, Edward Pottasch [EMAIL PROTECTED]
wrote:
ok thanks,
I was just a little curious about the code I posted yesterday.
Possibly I made some error there I am not sure. I
Chaitanya,
not exactly sure if I have understood your system but here is my interpretation
below. When in a long term uptrend the price moves down 5 consecutive bars and
then closes green including a higher high is set then buy the next bar at the
open, similar story for short,
Ed
per
hi,
it seems to be possible. I ran this code on top of some backtest. The results
in the AA window show that both loops are used. If you want to change a trade
then you will have to change this setup. Here I first run the backtest and then
go through the signal object.
Ed
@yahoogroups.com, Edward Pottasch [EMAIL PROTECTED]
wrote:
hi,
it seems to be possible. I ran this code on top of some backtest.
The results in the AA window show that both loops are used. If you
want to change a trade then you will have to change this setup. Here
I first run
signal, ESLR the second,
etc. and one should have a total of 25 lines of output for that bar
(5 x 5) because there are 5 signals. Likewise, the 2nd bar should
produce 9 (3x3) lines of output.
Make sense?
David
--- In amibroker@yahoogroups.com, Edward Pottasch [EMAIL PROTECTED
1 - 100 of 486 matches
Mail list logo