Coding help - page 76

 
mladen:
macerina This would be an indicator calculating "CCI bars". Try it out

Thanks Mladen for the indicator ... that was very helpful

 
mladen:
Try this one

What it does is the following : it draws 2 thicker lines at the start. You have to adjust the position of those 2 lines. After that it draws required number of lines back and forth. Every time you adjust the thicker lines positions it redistributes the rest of the lines to reflect the two "main" lines positions

PS: it does not "clean up" after you remove the indicator (it is done so in order to keep the manually adjusted lines on screen even when you change time frames or symbols or you restart the terminal) so you have to clean up those lines manually when you remove it from the chart (best to place it on empty chart)

Ok Mladen,

i have manually adjusted the position of the 2 lines.....but if I would automatically spacing them for example by 30 bars starting from a low or an high?

How can I do?

thank's in advance

 
carbonmimetic:
Ok Mladen,

i have manually adjusted the position of the 2 lines.....but if I would automatically spacing them for example by 30 bars starting from a low or an high?

How can I do?

thank's in advance

carbonmimetic

The whole idea of that one was to simplify the whole thing : instead of entering anchor date and time and cycle length you simply place the 2 lines (by dragging them) to the peaks you like the most and it will do the rest of the job. In the description of the cycle lines metastock is saying the following :

  1. Click Insert | Cycle Lines.
  2. Position your mouse on the first reversal and click the left mouse button. Continue to hold the left mouse button and drag the pointer out to the next reversal on the chart and release the mouse button. In this example there might be 50 days between the first reversal and the second reversal.
  3. You will now see a cycle line draw on the screen at the same time period across the chart (e.g., every 50 days). In this example you identified the time period from the first reversal to the second reversal as the cycle period.
  4. If you notice that the rest of the cycle lines also appear at the same approximate time as a reversal, like the third reversal, fourth reversal etc it means the reversals do happen in cycles (approximately 50 days in this example).
  5. Once you know the time periods when the cycles appear you can use this information to predict the next reversal. For example, if the last reversal in the chart happened 40 days ago you would know, in this example, that the next reversal will be in 10 days if the cycle continues as it has in the past.

More or less, you can do the same with that (cycle lines for metatrader) indicator exactly the same as they described it. Here s one example of it :

Files:
cycles_1.gif  39 kb
 
macerina:
flower_afl.txt

Mladen/Mrtools is it possible to code a similar indicator in mt4.

I have no clue what this is based on . I have attached the image and the amibroker afl code.

Thanks in advance

Mladen any possibility on this

 
macerina:
Mladen any possibility on this

macerina

I did take a look at that code but so far no results (too many points that needs to be clarified)

 
macerina:
Mladen any possibility on this

Assuming the AFL doesn't repaint !!

Did you check ?

 
secretcode:
Assuming the AFL doesn't repaint !! Did you check ?

Don't know yet. Could not check the whole thing

 
mladen:
Don't know yet. Could not check the whole thing

Thanks for reply Actually was trying to ask Macerina if he could checked afl on live data...

 
mladen:
carbonmimetic

The whole idea of that one was to simplify the whole thing : instead of entering anchor date and time and cycle length you simply place the 2 lines (by dragging them) to the peaks you like the most and it will do the rest of the job. In the description of the cycle lines metastock is saying the following :

  1. Click Insert | Cycle Lines.
  2. Position your mouse on the first reversal and click the left mouse button. Continue to hold the left mouse button and drag the pointer out to the next reversal on the chart and release the mouse button. In this example there might be 50 days between the first reversal and the second reversal.
  3. You will now see a cycle line draw on the screen at the same time period across the chart (e.g., every 50 days). In this example you identified the time period from the first reversal to the second reversal as the cycle period.
  4. If you notice that the rest of the cycle lines also appear at the same approximate time as a reversal, like the third reversal, fourth reversal etc it means the reversals do happen in cycles (approximately 50 days in this example).
  5. Once you know the time periods when the cycles appear you can use this information to predict the next reversal. For example, if the last reversal in the chart happened 40 days ago you would know, in this example, that the next reversal will be in 10 days if the cycle continues as it has in the past.
More or less, you can do the same with that (cycle lines for metatrader) indicator exactly the same as they described it. Here s one example of it :

Well,

it is clear.....but there are 2 methods to use CYCLE LINES:

1) is your explanation...and it is ok

2)the other is to start from a low or an high,input for example 30 bars.....so I have the first vertical line starting from that low or high...and the second line after 30 bars.

I would like have also this second possibility...

Thank's for your patience..............

 
secretcode:
Thanks for reply Actually was trying to ask Macerina if he could checked afl on live data...

I checked with the data i had and as far as i can see it does not repaint in realtime.

Mladen Thank you for your effort ... will wait for the completion.

Reason: