Beginner's question... How to find prices and draw lines automatically...

 

Hi all

Thanks to everyone for a great community here - I am a newbie to MT4 and enjoying the product immensely!

I'd like to code up the following:

  • Get open and close prices for the last xx weeks (going back 5 years)
  • Then I'd like to plot thin lines on a chart automatically (for potential s+r).

Ideally, a button to update / redraw the line would be great. But am happy to do that manually if it's complex.

Can anyone point me in the right direction? How/where do I start?

Thanks

 
avgjoe007:

Hi all

Thanks to everyone for a great community here - I am a newbie to MT4 and enjoying the product immensely!

I'd like to code up the following:

  • Get open and close prices for the last xx weeks (going back 5 years)
  • Then I'd like to plot thin lines on a chart automatically (for potential s+r).

Ideally, a button to update / redraw the line would be great. But am happy to do that manually if it's complex.

Can anyone point me in the right direction? How/where do I start?

Thanks

The book and online help is a good place to start. Then you can open up one of the indicators from the indicators directory and see how it works, looking up any commands you don't understand in the online help.

If you are using a weekly chart then High[] is an array of the High prices of the pair displayed on the chart indexed with 0 as the current week. Low[] is for the Low prices.

There is a lot to study up on. Good luck.