Re: [amibroker] BuySignal

 

Thank you.
Like you, I also suffer to interpret the afl code;
I will study what you proposed and then make any comments.
The GapUP () function does not meet my goal.

Best Regards.
Edilson


Em Segunda-feira, 25 de Julho de 2016 14:00, "brandon.richard03@yahoo.com [amibroker]" <amibroker@yahoogroups.com> escreveu:


 
I gave your AFL a shot and I'm horrible at interpreting AFL most the time so not quite sure what you we're exactly doing but from my understanding of your goal, here's a simple snippet of entering on an gap up.

I'm not familiar with the use of GapUp() because from my reading of the function, it refers to it in days so not sure if it's intended for bars? Also I know from a previous experience that it is kind of a forward bias as it references the bars low and previous bars high so you need to have a entry delay if using it.

//Periodicity set to 15 minute in settings

UpGap = TimeFrameGetPrice("H",inDaily,-1) < ValueWhen(Day()!=Ref(Day(),-1),L);
// Second half of statement means low of first candle of day is greater then previous days high,
// could also use Open as a value so open of candle is greater then previous days high.

// identifies the high and low of the first candle of the day
HighOfFirstBar=valuewhen(day()!=ref(day(),-1),H);
LowOfFirstBar=valuewhen(day()!=ref(day(),-1),L);

TimeOfDayOkay= TimeNum() < 120000;// Event happens before noon

Buy = Cross(H,HighofFirstBar) AND TimeOfDayOkay AND UpGAP;
Sell = TimeNum() == 154459;//selling at closing

BuyPrice = Max(HighOfFirstBar,O);// entry price is high of first bar or open of current candle(which ever is higher)
SellPrice = Close;//sell price is close of last candle

I could be way off from your goal and this is just a snippet off a the GapUp side, if its on track you should be able to fill in the rest of your system.


__._,_.___

Posted by: Edilson Santos <edilson.floriano@yahoo.com.br>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (4)

Save time and get your email on the go with the Yahoo Mail app
Get the beautifully designed, lighting fast, and easy-to-use Yahoo Mail today. Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/


.

__,_._,___


EmoticonEmoticon