PureBytes Links
Trading Reference Links
|
the coolestdude,
I think your problem is with the understanding of arrays - look up in the
user guide.
In the meantime
try this it might be what you want.
Buy = Cross(Signal(),MACD());
Sell = Cross(MACD(), Signal());
Filter = Buy OR Sell;
AddColumn(iif(buy, BuyPrice, null),"buy price", 10.2);
AddColumn(if(sell, SellPrice, null),"sell price",10.2);
//this line doesnt work. - use backtester or Equity() -
AddColumn(BuyPrice-SellPrice,"profit",10.2);
_____
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf
Of thecoolestdude1369
Sent: Thursday, 9 November 2006 11:30 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Re: really really need help....
i was expecting to see a column with all the buy prices and since
the formula won't trigger on the same day all the sell prices in the
next column. they should both be different prices. for instance
the price of the stock at the close when all buy criteria is met and
the price of the stock at the close when all sell criteria is met
for the trade to close out. this way i can look and see profit and
loss.
--- In amibroker@xxxxxxxxx <mailto:amibroker%40yahoogroups.com> ps.com,
"Mark H" <amibroker@xxx> wrote:
>
> What do you expect to see then?
>
> BuyPrice and SellPrice are arrays which are automatically assigned
by the Settings under the "Trades" tab.
> They are of course the same if they are both set to open or close
in the Settings there.
>
> ----- Original Message -----
> From: thecoolestdude1369
> To: amibroker@xxxxxxxxx <mailto:amibroker%40yahoogroups.com> ps.com
> Sent: Wednesday, November 08, 2006 6:21 PM
> Subject: [amibroker] really really need help....
>
>
> i've sent this in before but can't seem to get it to work and
have not
> got any fix. i've read the guide, i've looked at countless
examples
> and went through the tutorial several times and still can't get
this
> to work. here's a simple formula that i found in the tutorial--
which
> seems to work fine in scan and backtest but having abolutely no
> success in exploration.... buy and sell price are always the
same and
> never show the profit or loss. what am i doing wrong!? please
help...
> i want it to work for exploration./
>
> Buy = Cross(Signal(),MACD());
> Sell = Cross(MACD(), Signal());
>
> Filter = Buy OR Sell;
>
> AddColumn(BuyPrice,"buy price", 10.2);
> AddColumn(SellPrice,"sell price",10.2);
> AddColumn(BuyPrice-SellPrice,"profit",10.2);
>
Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.14.11/542 - Release Date: 11/20/2006
|