PureBytes Links
Trading Reference Links
|
I can not see what you are looking for in your code. Applystop() is for
exits not for entries.
If you want to buy on a new high immediately after close price crosses
your moving average the code should be smth. like this:
myAverage = ....
Cond1 = Cross(Close, myAverage);
Cond2 = ref(Cond1,-1); // returns 1 if cross above occurs in the
previous bar
Cond3 = High > ref(High,-1); // returns 1 if new high is established
buy = Cond2 and Cond3;
BuyPrice = ref(high,-1) + ticksize; // buy 1 tick above previous High
// your exit logic using ApplyStop() here.......
zim630@xxxxxxxx wrote:
> Aaron
>
> Thanks much for the reply - Appreciated.
>
> The reason cross was not used was because when the condition was met, i.e. C> than moving average I wanted to initiate a buy stop above the high that occurred on the day of the cross. I'm sure that was not apparent :-)
>
> Sorry for the confusion.
>
> Thanks again
> Bill
>
>
>
> ------------------------------------
>
> **** 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/
>
> Yahoo! Groups Links
>
>
>
>
------------------------------------
**** 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/
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:amibroker-digest@xxxxxxxxxxxxxxx
mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|