Re: Coding Help

674
I have tried to get this indicator support and resistance horizontal rays to 'stop' when it is crossed by the price but retaining the 'ray' horizontal.
Can this be fixed?
I have spent almost a year trying to avoid using this indicator as the 'ray' part can be disabled but visually the chart needs the 'ray' to more easily pick up trades.
Thanks
TEAMTRADER


Re: Coding Help

676
Cheepeys wrote: Fri Apr 06, 2018 6:55 am PLEASE ALERT HELP NEEDED FOR THIS INDICATOR ON 1HR SUPP/RESIST WHEN PRICE BREAKOUT FROM IT.
Capital letters do not and never take any advantage,always try to write in standard/usual phrase
Indicator is just a tool.

Use it only if it can benefit you. Leave it if you don't know how to use it optimally.

Re: Coding Help

678
Hello again,
I need your help (always...)
I am trying to draw VLINEs one bar (what ever the time frame is switched) before a date time (in my case, begining of each week).

Code: Select all

datetime t = iTime(NULL,PERIOD_W1,i);
      
      int Bars_Ahead =1;
      
      if (t>0)
       {
        ObjectCreate("Line "+DoubleToStr(i,0),OBJ_VLINE,0,t,0);
        //ObjectSet("Line "+DoubleToStr(i,0),OBJPROP_TIME,t);
        ObjectSet("Line "+DoubleToStr(i,0),OBJPROP_STYLE,STYLE_SOLID);
        ObjectSet("Line "+DoubleToStr(i,0),OBJPROP_COLOR,colir);
        ObjectSet("Line "+DoubleToStr(i,0),OBJPROP_WIDTH,1);
        ObjectSet("Line "+DoubleToStr(i,0),OBJPROP_BACK,true);
        
        ObjectCreate("Line2 "+DoubleToStr(i,0),OBJ_VLINE,0, t - (Bars_Ahead * Period()*60),0);
thought i have found the answer by

Code: Select all

t - (Bars_Ahead * Period()*60)
But it didn't work.

I want the 2nd VLINE place ONE BAR before the datetime "t".

If I am on D1 PERIOD, I want the 2nd VLINE one bar (one day) before,
If I am on H4 PERIOD, I want the 2nd VLINE one bar (4 hours) before,
If I am on H1 PERIOD, I want the 2nd VLINE one bar (1 hour) before ... etc

Can you help me please?

Regards.

Re: Coding Help

680
alpha24 wrote: Thu Apr 12, 2018 3:42 am Dear Mrtools ,
I tried to add NLMA in this code there is no error but can not displayed on chart.
Please correct it. if there is already awesome oscillator with all averages and prices
please give me link.(searched everywhere but can't get)
Added all the averages.
These users thanked the author mrtools for the post (total 7):
alpha24, PriyaPandian, Jimmy, AlexLoco, Skyold, talaate, Jedidiah


Who is online

Users browsing this forum: No registered users and 12 guests