Amibroker afl for dhiraj 2652 method

vinodkiyer

Well-Known Member
#11
deepak V. kotak,
you have to set the parameters after loading the afl. I traded the same yesterday.

dear bandlab,

i have made the corrections in order to take the dayh/l at 1015 for calculating the add/substract parameter and thereafter day h and day low in order to move entry/exit points using the same parameter calculated at 1015 day h /l.

now what exactly do u mean by 1st trade/2nd trade etc. pls reply asap, meantime i will work on the pop up / sar

regards
vinod
 

Mangafreakz

Well-Known Member
#12
@vinodkiyer
Thanks so much for sharing your AFL . If you made any changes in your AFL , can u please upload it too.
Btw when I am scanning using Automatic analysis , it says missing Buy/sell signals. am new to Amibroker, can u please sort out my problem.
 
Last edited:

vinodkiyer

Well-Known Member
#13
mangafreakz,

that was a beta version and incomplete and had bugs due to which could not be used for scanning which is now fixed. I am waiting for bandlab's reply after which the completed afl will be posted, hopefully by this evening.

vinod
 

vinodkiyer

Well-Known Member
#15
Hi everyone,

I have debugged and added extra parameters into the afl and here are the highlights:

1. filters used for volume, price range(to filter out penny stocks), percentage change(to find losers/gainers)

2. switches to show/hide range lines, trade lines, and get ready/entry markers and background colour.

3. take profit percentage values, stoploss percentage values and get ready warning for entry percentages.

all above can be set as per individual likings through parameters window (and must be set before using same.)

I have used the factor finding part suggested by bandlab and not the original method as per 1st page of Dhiraj's thread. in my earlier attachment on page1 , I had used as per Dhiraj.

You can scan as well as explore and use as indicator.
After making the earlier posted afl, i used it to short axisbank and aban both were in the money.

only make sure all the parameters are as you want when you use as indicator and independantly check the parameters when used as explorer/scanner.

I improved / debugged the earlier posted afl and added the above parameters as well as the stoploss has been modified to include SAR as suggested by Bandlab and just now completed. I will be using same to trade on Tuesday for trading.

all of you, please try out and suggest any modifications / improvements

I couldnt add the popup messages as whenever we click on the chart, all the messages keeps popping up all over the place, instead, I have added audio alerts which can also be viewed through the alert window.

regarding 1st trade / 2nd trade etc suggested by Bandlab, I dont understand what he means and awaiting his reply, so that we can add that parameter also, in which case I will post that in case of improvements.

Regards
vinod
 
Last edited:

bandlab2

Well-Known Member
#16
1st trade is what you take 1st time after 10:15. now lets say buy is triggere and met with SL. now we can take one more trade. this is called 2nd trade. if this also meets SL, then 3rd trade. the chances of meeting target increases with every trade as its unlikely for a stock to fail so many times. for 2nd trade u can take 0.81% as profit

generally speaking, i take ONLY 2nd, 3rd trades. as chances are better. i have a basket of 40 stocks and from this we get atleast 3 such trades. taking 1st trade for so many stocks is not possible due to MM. So we need to take best trades that have highest probability.

put filters to eliminate small stocks. make sure u have good liquid stcoks that move well with market. like jpa, dl, tisco, ril, sbi, axi, icici, hdil, rcom, aban etc. dont take stocks less than 150 rs as they can hit SL pretty quickly. also dont take defensive stocks like HUL, ITC, Pharma stocks

make sure u get not more then 40-50 stocks. also put alerts for 2nd trades, not 1st trade. else you will be deluged with alerts and miss the quality trades. also put alert when price meets trigger and pulls back giving us a better price to enter. here the risk reward ratio would be better. sometimes u may miss if u wait for a pullback. but thats ok, hat we want is high probability trades. not trading every stock. in a day u take 3 , 4 good trades. u can end the day in profit

vinod, can you check if you can get email alert in addition to popup, as we cant be looking at the screen always, we could be traing some other thing. we get email, then we act.

pl let me know if you need any help to test and compare the filters with mine. its very important that filters are calclated properly

good luck
 

vinodkiyer

Well-Known Member
#17
dear bandlab,

many thanks for the explanation which i will try to incorporate into the afl and once finished post again.

meanwhile have you tried the revised afl which i posted just before your posting. In this afl i have added parameters which can be user set by right clicking on the chart. let me summarize what i have done.

1. takes the day high and low at 1015 am and calculates factor using 0.433, 0.7666 and 1.355 (pre day high minus low multiplied by theses values) as the base values.
The fourth value being days high minus days low at 1015 am.
Now the filter to find the applicable factor for the stock out of the three is calculated as per your suggestion for which u gave me the part in your earlier post which i ditto replaced without any tweaking (copy pasted that part in place of the one I used in my first posting of afl).

thus we have now applicable factor for the entire day (fixed) to be added to day low for buy trigger (trigger value of which will vary depending on day low variation after 1015 but the applicable factor remains that of 1015 calculation), similarly if day high varies short trigger varies (day high minus applicable factor which is fixed for the entire day found out at 1015 am)

2. buy stop loss is 1 percent less from the buy trigger and will move whenever buy trigger moves with the day low AFTER 1015. On the other hand at any time if the buy stop value is less than short trigger, then buy stop will not consider 1 percent instead we SAR at short trigger. Vice versa setting for short stop to buy trigger.

3. take profit value is 0.5 pecent above for buy position and 0.5 % below for short position.

Now in case stop is hit we need to increase the take profit to 0.8% and also double our traded quantity. For increasing the take profit value, I have added variable parameter in the parameter dialogue window where the minimum value and default value is set at 0.5 % but can be increased Upto maximum of 30% with 0.1 percentage increment. So in case sl is hit one can set as per their liking and the chart will reflect same.
regarding quantity doubling must be done in the broker terminal as amibroker has nothing to do with it.

same with stop loss percentage, where the default value is 1 percent and can be ranged from 0.2 percent to 5 percent through parameters dialogue box.

I have added a variable parameter called get ready warning meaning that it gives u warning of an impending buy or short trigger cross over in advance so that we can be ready to take position with the latest entry values. ( this especially feel necessary as we cannot take any value as fixed and put a stoploss or limit order with that value in the broker terminal as the entry point keeps moving with the days high and low variation after 1015 am). This warning percentage meaning at what distance u need the warning of a possible crossover of entry point which i have set default at 0.5 % but can be ranged as per individual liking from 0.1 to 5 % with 0.01% increment)

additional filters used in the parameters are:
1. percentage change in price of the day filter, ranging from -100 to + 100 in 0.1 % increment when set can filter out those stock which are only bearish or bullish or both upto percentage variation as per individual setting.

2. price range filter - to filter out minimum price to maximum price as per individual setting by which u can filer out stocks having values from Rs 1 to Rs 20000

3. volume filter which can be used to filter out only high volume stocks - range
50 to 1000000 - as per user setting

additional toggle switches
1. background colour
2. show / hide range lines (day high low lines etc.)
3. show/hide trade lines (buy/short trigger, stoploss and take profit levels plotted as lines on the chart)
4. show/hide markers (get ready triangles and entry point arrows.)

Earlier, few months back I had made an excel workbook to calculate dhiraj method which I stopped using as was very difficult to trade due to frequent requirement of inputting values into the sheet). during that time i was using spider iris for trading. 3 months back I bought amibroker where we could make afls of our own. I compared this spreadsheet values with the afl i made and found all the results coinciding until when I changed the applicable factor with the one suggested by you. (the excel sheet uses the original Factor of Dhiraj).

so that is the long and short of how I have made it to work.

kindly go through this posting carefully and also try the latest afl which i posted yesterday and tell me if I have made and understood the afl correctly so that we can make corrections as soon as possible. Kindly let me know also of any factor calculation corrections. much obliged if u could find time and post back asap so we may be able to trade the system on tuesday. ( I also have plan to make an afl on intraday mini flow of Saint sir, with my meagre knowledge if possible once this project is complete)

meantime I will work on 1st trade 2nd trade and other suggestions and email from your last posting.

many thanks from myself and on behalf of all members for your guidance by which we may all enlighten and profit (like they say on CNBC).

Best regards
vinod
 

vinodkiyer

Well-Known Member
#18
Dear bandlab,
your quote:
1st trade is what you take 1st time after 10:15. now lets say buy is triggere and met with SL. now we can take one more trade. this is called 2nd trade. if this also meets SL, then 3rd trade. the chances of meeting target increases with every trade as its unlikely for a stock to fail so many times. for 2nd trade u can take 0.81% as profit
Unquote

- by this do u mean only long trade? what happens if after first sl hits and instead of rebounding, SHort entry is triggered, which case will this be a second trade i.e. 1st trade long and hits sl and second trade short?

- MM - confirm it is Mark to market

your quote
put filters to eliminate small stocks. make sure u have good liquid stcoks that move well with market. like jpa, dl, tisco, ril, sbi, axi, icici, hdil, rcom, aban etc. dont take stocks less than 150 rs as they can hit SL pretty quickly. also dont take defensive stocks like HUL, ITC, Pharma stocks
unquote

Will the parameter filters will suffice for the above or do we need some other way?

your quote
pl let me know if you need any help to test and compare the filters with mine. its very important that filters are calclated properly
Unquote

pls give me the filters if what I have already explained in my last posting is incorrect or any additions are required.

many thanks
vinod
 

bandlab2

Well-Known Member
#19
vinod,

on tuesday, i can post all the filters aroun 10:20 AM, so you can compare

2nd trade can be in any direction. its nothing to do with 1st. however if 1st trade is successful, dont take 2nd trade in that stock. we are done !!

MM -- Money Management. we need to place orders ahead , or else we may miss the boat. to do this we need goo margin. and also with fixed capital, you can only trade a few. thats why pick high probable trades. our goal is how much profit we make. not how many trades we did

filters to pick winners-- set volume, price and range. we need to have a good movement. not dull stocks like HUL, ITC, etc. make sure you have no more than 40. quality is important.

also futures are good compared to spot as they will have less stray ticks. smoothing effect is more in futuers than spot. sometimes u see suen spikes in spot but not so much in futures. but spot gives u advantage of aveaging the quantities as we can buy any lot not fixed lots like futures

regading warning alert before trade, you can also think of alerting after hitting trigger and a pullback occurs, this gives us more profit less loss

btw, yr above post captures all the important points and you are on right track. once we compare the applicable filters, we are good to go
 

vinodkiyer

Well-Known Member
#20
Hi bandlab,

many thanks for your post. As I have few other commitments until tomorrow afternoon, i will work on the afl to improve it for 1st / 2nd trade etc and email and other and will try to complete by tomorrow late evening and post it when done.

meantime I will also wait for your tuesday 1020 posting of filters to compare.

best regards
vinod
 

Similar threads