Recent Posts

Pages: [1] 2 3 ... 10
1
Amibroker Help / problem in timeframeset question!!
« Last post by st-scott on Today at 05:37:07 am »
i try the timeframeset in 5min and 1min with the macd (12,26) and signel (12,26,9)
it work and prefect!!
but when i use the zero lag macd in the same timeframeset,it not work!!
my test is

_SECTION_BEGIN("ZeroLagMACD");
p = Param("p",12,3,36,2);
q = Param("q",26,3,52,2);
r = Param("R",9,3,15,1);

EMA1= EMA(Close,P);
EMA2= EMA(EMA1,P);
Difference= EMA1 - EMA2;
ZeroLagEMAp= EMA1 + Difference;
EMA3= EMA(Close,Q);
EMA4= EMA(EMA3,Q);
Difference= EMA3 - EMA4;
ZeroLagEMAq= EMA3 + difference;
ZeroLagMACD=ZeroLagEMAp - ZeroLagEMAq;
EMA5= EMA(ZeroLagMACD,R);
EMA6= EMA(EMA5,R);
Difference= EMA5-EMA6;
ZeroLagTRIG= EMA5 + Difference;

Plot(zerolagMACD,"",colorRed,1);
Plot(zerolagtrig,"",colorGreen,1);

TimeFrameSet(in5Minute);

m5up = cross(zerolagMACD,zerolagtrig)  ;
m5down = Cross(zerolagtrig,zerolagMACD);

TimeFrameRestore();

m5up = TimeFrameExpand(m5up,in5Minute);
m5down = timeframeexpand(m5down,in5Minute);

Buy = cross(zerolagMACD,zerolagtrig) AND m5up;
Sell = Cross(zerolagtrig,zerolagMACD);
Short = 0;
Cover =  0;

i want to try when zerolagmacd line over zerolagtrig line in 5min
then buy in 1min when zerolag macd cross zerolagtrig
but i check in chart it not the same with i wanted!!
is my afl wrong?
THX all guy!!

ps,may be my english not that good!!sorry!!!
2
Amibroker Help / Re: Help -- How to code buying foreign and getting foreign equity
« Last post by dgorrd on April 23, 2017, 09:19:02 pm »
This is similar to my question.  I'm waiting for an answer too.
3
Amibroker Help / Help -- How to code buying foreign and getting foreign equity
« Last post by Tony_wyt on April 19, 2017, 04:42:43 am »
Hi, I'm studying Amibroker and I'm stuck in coding buying at foreign symbol. Here is the scenario: I put two symbols in my database, Symbol 'A' and 'B'. When buy condition from 'A' is satisfied, buy signal will be sent to 'B'. I coded like this:

Symbol = A;
BuyCondition = xx; //xx, yy are samples of the conditions from A
SellCondition = yy;

SetForeign(B, True, True );
Buy = BuyCondition;
Sell = SellCondition;
e = Equity();
RestorePriceArrays( True );

I did the backtest, I could get the result when current symbol was 'A' and the equity changes from A. But I needed to know the equity result from 'B', which the real trades should have been made there. For data holes reason, I can't use 'B' as current then set foreign to A. Here comes my question, how to modify my code to buy at foreign and I can get foreign equity backtest result correct? Thank you.
4
Amibroker Help / How to plot one ticker and trade another
« Last post by dgorrd on April 19, 2017, 03:25:49 am »
I want to perform technical analysis on and index but trade another symbol.  For example if ATR(15) of SPY is < 2 then buy GOOGL.  I have my plotting and system setup but I don't know how to use the buy/sell/short/cover statement using a foreign ticker symbol.  I've read the Foreign documentation but I don't see how to do it.  Can anyone help with  this?
Thanks
5
Amibroker Help / Re: Help - Can Amibroker do this?
« Last post by sam mcgee on April 17, 2017, 06:15:12 pm »
You could try something like this:
Code: [Select]
PricePattern1 = Cross(EMA(C,2),EMA(C,5));
PricePattern2 = O > Ref(H,-1);
PricePattern3 = O > EMA(O,25);
Number = Optimize("Number",1,1,3,1);
if( Number ==1) PricePattern = PricePattern1;
if( Number ==2) PricePattern = PricePattern2;
if( Number ==3) PricePattern = PricePattern3;
Condition1 = RSI(2)<70;
Buy=PricePattern AND Condition1;
Sell = Cross(EMA(C,5),EMA(C,2));
6
Trading System Discussion / Re: Long and Short Signal at same time
« Last post by madhavpatel on April 15, 2017, 02:27:31 am »
i think there is some afl problem so it give both signal can u mail me than i can solve you problem

madhav_1040@yahoo.com
7
Trading System Discussion / Re: System with min 2 week break between trades
« Last post by madhavpatel on April 15, 2017, 02:22:57 am »
U need Afl ??
8
Amibroker Help / How to code this?
« Last post by likhazar on April 13, 2017, 04:38:27 am »
Hello,
I am looking for pattern where last top fractal is lower then previous top fractal and buy signal is generated when price is going higher then lower fractal.
Anyone can help me?
9
Amibroker Help / Re: Hold Min Bars
« Last post by administrator on March 29, 2017, 09:54:17 pm »
I would assume no. I would think it would only apply to open trades.
10
Amibroker Help / Hold Min Bars
« Last post by drakul on March 29, 2017, 04:48:31 pm »
Does HoldMinBars option also works the other way? That is, if the backtest generates the SELL signal, then also for the "N" number od bars the BUY signal is ignored?

I am talking about: SetOption(Holdminbars, N), where N is The number od bars...
Pages: [1] 2 3 ... 10