- Joined
- 27 September 2007
- Posts
- 406
- Reactions
- 1
Ah so easy. LOL thanks beamstas
Ah so easy. LOL thanks beamstas
No, that is only equal to the HHV value, not crossed it. You want something like this:1) Buying a stock that has just crossed its highest high for 100 days. i have this:
cond1=HHVBars(H,100) == 0;
Is this right?
Set BuyPrice to Ref(HHV(H, 100), -1) plus whatever extra amount you want.2) How do i make the buy price the price of the highest high for 100 days plus one tick?
If you're doing the stop-loss yourself, set SellPrice to that value. If you're using the ApplyStop function, I'm not sure off the top of my head.3) How do i set the sell price to be the price of the stop loss. Currently it sells at the closing price of the day that the stop was tripped
That code looks okay to me, assuming you want the risk always based on $100K and not current equity. What's not working about it?4) I used to have a position size code but i think it was wrong
I want something like this
Capital = 100000;
Risk = 0.01*Capital;
PositionSize = Risk/(Close-my stop price)
Obviously i put in my code for my stop price that is easy enough. I can't work out how to get the position size to work though. For example if my stop price is 50 cents and buy price is $1 my risk is 50 cents for that trade and my total risk (example) is $5 per trade therefore i could buy 10 shares. Can that be done properly?
GP,
Thanks. I will give that a go.
Sails,
Have you tried clicking the intraday settings (under database settings) and marking the "Allow mixed EOD/Intraday data"?
Also, enable the local data storage too.
Search the AB help files for "GraphXSpace"
If it's not specified in your formula AB uses a default level of GraphXSpace=2; which adds space of 2% above and below the chart when it's opened. Adjusting the GraphXSpace variable is the same as zooming/increasing/decreasing bar height.
You could also adjust the settings manually via the "Parameters" box by adding something like:
GraphXSpace=Param("zoom",25,-20,50,5);
..to your formula. This would allow you to adjust settings manually and they would be saved the next time you open Amibroker. As with all things in AB there's several ways of doing things , (the new Gfx functions have opened up many new possibilities), it's just a matter of finding a way that suits your needs, whether that be formula based or gui based or a combination of both.
Just bought amibroker the other day, and am having a bit of trouble getting the free data trial from Norgate (premium data) working. I think i have followed all the instructions as per the website, but still having no luck. Anyone have any ideas what i'm doing wrong?
Cheers,
Shaun.
I'm trying to do a simple volume scan. All I want is a scan where the volume closes higher than the 2 standard deviations of its 20 day average.
I currently have this; Buy = Close > BBandTop( Close, 20, 2 );
However it is giving me results when the volume was higher not only today but for close's many days ago.
Can anyone help?
Sammy
If you are still stuck try sending an email to support@premiumdata.net, they are pretty fast to reply
Cheers
Brad
Hello and welcome to Aussie Stock Forums!
To gain full access you must register. Registration is free and takes only a few seconds to complete.
Already a member? Log in here.