Coding help - page 48

 

Hi, I am a Spanish trader. First, I apologize for my bad English. I'll explain what I need. When I trade, I like having "overview of the day."

I attached chart to explain it better.

Strategy in for DAX. When start the day, we usually have a Gap, so previous day close and opening of this day are different

So, the indicator that I need:

1. Vertical line at 8:00

2. Two horizontal lines (opening day and previous day close).

  • Opening day (candle time 8:00).
  • Previous day close (candle time 21:45).
  • 3. Horizontal lines:

  • Today open + x points (e.g. + 20)
  • Today open + x points (e.g. + 40)
  • Yesterday close - x points (e.g. - 20)
  • Yesterday close - x poins (e.g. - 40)

Bye and thank's!

Files:
dax.gif  18 kb
dax_1.gif  19 kb
 

Rahul

Here is a HMA made to draw dots. You can see in it how can it be done to make it (tried to keep it as simple as it can get)

rahul701:
Hi Mladen , I downloaded 3 indicators coded by you: T3 , HMA color , HMA2. Can we convert them to dots instead of lines. I tried searching on net and found out that we might need to do this for each buffer to make it plot dots: SetIndexStyle(0,DRAW_ARROW,EMPTY,1,Blue); SetIndexArrow(0, 0x9F); SetIndexBuffer(0,HighBuffer); In T3 we have: IndicatorBuffers(6); SetIndexBuffer(0,t3); SetIndexBuffer(1,t3Ua); SetIndexBuffer(2,t3Ub); SetIndexBuffer(3,t3Da); SetIndexBuffer(4,t3Db); SetIndexBuffer(5,slope); In HMA2: IndicatorBuffers(5); SetIndexBuffer(0,hma); SetIndexBuffer(1,hmada); SetIndexBuffer(2,hmadb); SetIndexBuffer(3,trend); SetIndexBuffer(4,work); In HMAcolornrp : IndicatorBuffers(7); SetIndexBuffer(0,ind_buffer0); SetIndexBuffer(1,ind_buffer1); SetIndexBuffer(2,ind_buffer2); SetIndexBuffer(3,ind_buffer3); SetIndexBuffer(4,ind_buffer4); SetIndexBuffer(5,buffer); SetIndexBuffer(6,trend); In the above buffers can you plz indicate on which buffers do we have have to apply this code(And if this code is correct at all): SetIndexStyle(0,DRAW_ARROW,EMPTY,1,Blue); SetIndexArrow(0, 0x9F); SetIndexBuffer(0,HighBuffer); SetIndexStyle(1,DRAW_ARROW,EMPTY,1,Red); SetIndexArrow(1, 0x9F); SetIndexBuffer(1,LowBuffer); And if we need to do any more changes in addition to this. Also can we add an Option to get the choice on whether to plot dots or lines. Regards , rahul. EDIT: I am Sorry for the mess created above, I dont know why my "Enter character" is not taken. Plz have a look at I1 and I2 to look at the formatted version of what I have written above.
 
mladen:
be careful about the length of the sound file you are using for alerts. If it is too long, it might cause you some problems (especially from an EA)

decided it was much simpler to use the message box rather than specific alert sounds in that case...

 
mladen:
Rahul Here is a HMA made to draw dots. You can see in it how can it be done to make it (tried to keep it as simple as it can get)

Mladen Thx a lot once again for ur such a simple and efficient style of writing codes, i converted all these 3 into dot indicators. But I still have one doubt. Suppose if we add SetIndexStyle & SetIndexArrow in the buffers "trend" and "work" , can it cause some malfunctioning of code. SetIndexBuffer(0,hmaup); SetIndexStyle(0,DRAW_ARROW); SetIndexArrow(0,159); SetIndexBuffer(1,hmadn); SetIndexStyle(1,DRAW_ARROW); SetIndexArrow(1,159); SetIndexBuffer(2,hma); SetIndexBuffer(3,trend); SetIndexBuffer(4,work);

 

vega mod/repair

hi, this is what i really need help with:

vegas currency, the one available generally here or on the web is not working properly for the alerts,

this may be a quirk in mt4 making it difficult but...

-alert should sound when price touches an MA line (in use there are 7)

-my preference would be to sound once per bar

-and as well i would like an email alert to be sent

if its simpler the middle MA could be left out just alerts for the other envelope types

I've added as much as I could with extra fib series to cover more timeframes

(I used vega before switching to mt4 and it was slightly different to handle all tf's without changing options, but with mt4 it would be great to have to alerts working)

vegas_currency_ziggy.mq4

Files:
 

Hi Mladen , though i did converted them to dot indicators but also managed to make them repainting. As u can see from the image , at the cursor red dot is appearing(bcoz it is repainted one). Can u plz point out what I did wrong:

I converted this code(T3 basic MTF): SetIndexBuffer(0,t3);

SetIndexBuffer(1,t3Ua);

SetIndexBuffer(2,t3Ub);

SetIndexBuffer(3,t3Da);

SetIndexBuffer(4,t3Db);

SetIndexBuffer(5,slope);

to :

SetIndexBuffer(0,t3);

SetIndexBuffer(1,t3Ua);SetIndexStyle(1,DRAW_ARROW); SetIndexArrow(1,159);

SetIndexBuffer(2,t3Ub);

SetIndexBuffer(3,t3Da);SetIndexStyle(3,DRAW_ARROW); SetIndexArrow(3,159);

SetIndexBuffer(4,t3Db);

SetIndexBuffer(5,slope);

I also added SetIndexStyle(,DRAW_ARROW); SetIndexArrow(,159); to Buffer 2 and also 4 but it became even more repainting.

I achieved same repainting effect for HMA color:

IndicatorBuffers(7);

SetIndexBuffer(0,ind_buffer0);

SetIndexBuffer(1,ind_buffer1);SetIndexStyle(1,DRAW_ARROW); SetIndexArrow(1,159);

SetIndexBuffer(2,ind_buffer2);SetIndexStyle(2,DRAW_ARROW); SetIndexArrow(2,159);

SetIndexBuffer(3,ind_buffer3);SetIndexStyle(3,DRAW_ARROW); SetIndexArrow(3,159);

SetIndexBuffer(4,ind_buffer4);SetIndexStyle(4,DRAW_ARROW); SetIndexArrow(4,159);

SetIndexBuffer(5,buffer);

SetIndexBuffer(6,trend);

I tried it for only buffers 1 and 3 but again no success. Also I m not getting segregated dots as u made for HMA2 but instead some line is seen joining them.

Regards,

rahul

Files:
image5.png  17 kb
 

it also needs a x10 multiplier for 5 digits

zigflip:
hi, this is what i really need help with:

vegas currency, the one available generally here or on the web is not working properly for the alerts,

this may be a quirk in mt4 making it difficult but...

-alert should sound when price touches an MA line (in use there are 7)

-my preference would be to sound once per bar

-and as well i would like an email alert to be sent

if its simpler the middle MA could be left out just alerts for the other envelope types

I've added as much as I could with extra fib series to cover more timeframes

(I used vega before switching to mt4 and it was slightly different to handle all tf's without changing options, but with mt4 it would be great to have to alerts working)

vegas_currency_ziggy.mq4
 

...

Rahul

Do it like these. The key in turning the non repainting versions to dot versions is to simplify as much as possible (since nrp requires some extra processing, when you convert to dots just cut, cut, cut ... )

rahul701:
Hi Mladen , though i did converted them to dot indicators but also managed to make them repainting. As u can see from the image , at the cursor red dot is appearing(bcoz it is repainted one). Can u plz point out what I did wrong:

I converted this code(T3 basic MTF): SetIndexBuffer(0,t3);

SetIndexBuffer(1,t3Ua);

SetIndexBuffer(2,t3Ub);

SetIndexBuffer(3,t3Da);

SetIndexBuffer(4,t3Db);

SetIndexBuffer(5,slope);

to :

SetIndexBuffer(0,t3);

SetIndexBuffer(1,t3Ua);SetIndexStyle(1,DRAW_ARROW); SetIndexArrow(1,159);

SetIndexBuffer(2,t3Ub);

SetIndexBuffer(3,t3Da);SetIndexStyle(3,DRAW_ARROW); SetIndexArrow(3,159);

SetIndexBuffer(4,t3Db);

SetIndexBuffer(5,slope);

I also added SetIndexStyle(,DRAW_ARROW); SetIndexArrow(,159); to Buffer 2 and also 4 but it became even more repainting.

I achieved same repainting effect for HMA color:

IndicatorBuffers(7);

SetIndexBuffer(0,ind_buffer0);

SetIndexBuffer(1,ind_buffer1);SetIndexStyle(1,DRAW_ARROW); SetIndexArrow(1,159);

SetIndexBuffer(2,ind_buffer2);SetIndexStyle(2,DRAW_ARROW); SetIndexArrow(2,159);

SetIndexBuffer(3,ind_buffer3);SetIndexStyle(3,DRAW_ARROW); SetIndexArrow(3,159);

SetIndexBuffer(4,ind_buffer4);SetIndexStyle(4,DRAW_ARROW); SetIndexArrow(4,159);

SetIndexBuffer(5,buffer);

SetIndexBuffer(6,trend);

I tried it for only buffers 1 and 3 but again no success. Also I m not getting segregated dots as u made for HMA2 but instead some line is seen joining them.

Regards,

rahul
 

anyone?? please! is fantastic..

joselopezde:
Hi, I am a Spanish trader. First, I apologize for my bad English. I'll explain what I need. When I trade, I like having "overview of the day."

I attached chart to explain it better.

Strategy in for DAX. When start the day, we usually have a Gap, so previous day close and opening of this day are different

So, the indicator that I need:

1. Vertical line at 8:00

2. Two horizontal lines (opening day and previous day close).

  • Opening day (candle time 8:00).
  • Previous day close (candle time 21:45).
  • 3. Horizontal lines:

  • Today open + x points (e.g. + 20)
  • Today open + x points (e.g. + 40)
  • Yesterday close - x points (e.g. - 20)
  • Yesterday close - x poins (e.g. - 40)

Bye and thank's!

anyone?? please! is fantastic..

 
mladen:
Rahul Do it like these. The key in turning the non repainting versions to dot versions is to simplify as much as possible (since nrp requires some extra processing, when you convert to dots just cut, cut, cut ... )

Dear Mladen u r the undisputed MASTER of nrp versions. I confess that before writing back to u, i was simply wondering , how I just cudnt convert a line to a dot . Thx a Super lot.

Regards,

rahul