hello,
I would like to draw trend lines with line segments.
These are static trend line, they will be fixed on a specific period.
With your help, I would like to know how to set the start time of the period and the end time.
If you have any leads let me know!
Kind regards.
- How to obtain the closed price within a specified period?
- Question on MACD
- Code Adjustment can't fix
Galsen:
hello,I would like to draw trend lines with line segments.These are static trend line, they will be fixed on a specific period.With your help, I would like to know how to set the start time of the period and the end time.If you have any leads let me know!Kind regards.
Maybe you will be lucky and somebody will understand what you are asking for
hello,I would like to draw trend lines with line segments.These are static trend line, they will be fixed on a specific period.With your help, I would like to know how to set the start time of the period and the end time.If you have any leads let me know!Kind regards.
I hope so because I do not speak English.
I'll try to make me understand.
Avec l'aide de translate.google, je reformule ma question:
I want to know how to use the x-axis to time on a trend line to two points?
Uncompiled / untested, but it should be something like this:
if(!ObjectCreate(0,LineName,OBJ_TREND,0,StartTime,StartPrice,EndTime,EndPrice)) { Print("ERROR CREATING LINE ", LineName); } else { ObjectSetInteger(0, LineName, OBJPROP_RAY, false); }
Thank you for your reply.
I understand the structure to create a line.
But my problem is that I can not use the datetime format.
exemple : I want to create a line that covers the day today.
ObjectCreate(0,LineName,OBJ_TREND,0,StartTime(00:00AM),StartPrice,EndTime(23:59PM),EndPrice)) .
How to write 00:00 AM and 11:59 PM in datetime format ?? thank you.
Well the simplest way for the start time would be by using iTime on PERIOD_D1. Not infallible as if the D1 chart is updating, you may get an error
You can find midnight today with
datetime Midnight=TimeCurrent()-(TimeCurrent()%(PERIOD_D1*60));
(I learnt that from RaptorUK)
and you can then add the number of seconds in a day-60 to get to 11:59
thank you very much.
I think that , I found my answer.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register