Chris Taylor: Just not sure how to amend for the OBJ_TREND.
Change the type. Add the second time/price coordinate.
In future please post in the correct section
I will move your topic to the MQL4 and Metatrader 4 section.
Still not sure what you mean.
I've got this but not sure what you mean about the time/price coordinate
ObjectCreate(IndiName+"_P line", OBJ_TREND, 2, LineShiftTime, YC);
Exactly what he said add the second set of parameters currently you only have the staring point.
Read the documentation.
ObjectCreate(IndiName+"_P line", OBJ_TREND, 2, LineShiftTime, YC, TimeCurrent(), YC);
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
Hi all,
Pretty raw with coding and have hit a wall. I don't mind admitting that I've backwards engineered some code on an indicator I found online to make it work for me. It's a manual pivot where I enter the H, L & C and it plots the pivots on a chart. However it's using a horizontal line and I've found from research that you can't specify a date and time on a horizontal line but just a price.
As I mainly trade indicies and not FX I need to pivot lines to start at a specific time. So for example I'd need them to start at 07:00 GMT+1 for FTSE and DAX.
I know the code is obj_TREND but that's as far as I've got. Below is a snippet of the code I've got for drawing one of the horizontal lines. Just not sure how to amend for the OBJ_TREND.