Hello friends,
1st Afl
=======
Can anyone help me to write this simple trading system to backtest.
The buy criteria goes as such;
Buy on the third bar in a series of three consecutive higher highs and
the buy bar (ie the third bar) must be a bar whose close is greater than the open.
So far things are ok but I want to sell on the fourth bar close.
Please make the necessary correction in the afl below.
I want to sell on the next day of the buy bar and run the system to see
how many winners and losers will this system give me over a given period.
Cond1 = High > Ref(High,-1) AND Ref(High,-1) > Ref(High,-2);
Filter = 1 AND Cond1 and C > H;
buy = Cond1 and C > H;
// I want to sell on the next day of the buy
Sell = ????;
If I write the sell statement as
Sell = Ref(Close,1); then I get numerious red arrows following the above criteria and the system
does not give correct values when I back test it or when I click for report generation.
On the basis of selling the following day I can use a number of combinations as filters and get some simple trading systems.
The afl can give which criterias are a good one day winners. Of course this is a system and one can get more losers than winners.
2nd AFL
=======
One sees various coloured labels corresponding to indicators in the right side in the price label axis.
The last traded price or Close is in black.
I want to write for example an afl which will correspond to a particular criteria eg.
if the current close is above the 200 dma so the same should be filtered and shown
one can write
Filter = Cross(Close, dma(close,200);
but since i have the dma line on the chart in the colour red and a red label on the value label axis on the right
with a numerical value corresponding to the last dma(200) value. I also have a close price label of the last bar
in black,
How can I write the same filter as above but using only the label colours which I know before hand.
Thanks in advance,
bam
1st Afl
=======
Can anyone help me to write this simple trading system to backtest.
The buy criteria goes as such;
Buy on the third bar in a series of three consecutive higher highs and
the buy bar (ie the third bar) must be a bar whose close is greater than the open.
So far things are ok but I want to sell on the fourth bar close.
Please make the necessary correction in the afl below.
I want to sell on the next day of the buy bar and run the system to see
how many winners and losers will this system give me over a given period.
Cond1 = High > Ref(High,-1) AND Ref(High,-1) > Ref(High,-2);
Filter = 1 AND Cond1 and C > H;
buy = Cond1 and C > H;
// I want to sell on the next day of the buy
Sell = ????;
If I write the sell statement as
Sell = Ref(Close,1); then I get numerious red arrows following the above criteria and the system
does not give correct values when I back test it or when I click for report generation.
On the basis of selling the following day I can use a number of combinations as filters and get some simple trading systems.
The afl can give which criterias are a good one day winners. Of course this is a system and one can get more losers than winners.
2nd AFL
=======
One sees various coloured labels corresponding to indicators in the right side in the price label axis.
The last traded price or Close is in black.
I want to write for example an afl which will correspond to a particular criteria eg.
if the current close is above the 200 dma so the same should be filtered and shown
one can write
Filter = Cross(Close, dma(close,200);
but since i have the dma line on the chart in the colour red and a red label on the value label axis on the right
with a numerical value corresponding to the last dma(200) value. I also have a close price label of the last bar
in black,
How can I write the same filter as above but using only the label colours which I know before hand.
Thanks in advance,
bam