Coding help - page 133

 
chrisstoff:
I would like to ask for help concerning the issue I have with a modified SpudFibo indicator. The problem is that the object description disappears from the InnerFibs while they remain perfectly on the chart at FiboUp and FiboDn. The attached image illustrates the problem.

Christoff

All you have to do is give it some more space from the right side

The problem is that the inner fibo is extended one day into the future and if the ending time is out of the screen, labels are not going to be displayed. See the examples : upper is when I give less space to the fibo and lower is when I extend that space from the right. As you can see they are visible in the second case without changing anything in the code. All in all, you probably found one more bug in metatrader

Files:
fibo1.gif  35 kb
fibo_2.gif  37 kb
 
mladen:
Christoff

All you have to do is give it some more space from the right side

The problem is that the inner fibo is extended one day into the future and if the ending time is out of the screen, labels are not going to be displayed. See the examples : upper is when I give less space to the fibo and lower is when I extend that space from the right. As you can see they are visible in the second case without changing anything in the code. All in all, you probably found one more bug in metatrader

Mladen,

Thank you for figuring this out.

Well, I might be happy to finding a new bug in Metatrader but, as far as I know, they do not pay for it anything, so I remain being sad - LOL

 
chrisstoff:
Mladen,

Thank you for figuring this out.

Well, I might be happy to finding a new bug in Metatrader but, as far as I know, they do not pay for it anything, so I remain being sad - LOL

If we were payed by the number of bugs found in metatrader there would be a lot of rich people by now

 

Average Directional Movement Index (I'm referring to the standard ADX indicator that is included on every MT4 platform)

Can some nice person please modify the code so that the ADX line has different colors based on its slope?

For example, let the upward-sloping part of the ADX line be blue; the downward-sloping part be magenta; the zero-sloping part be yellow.

Many thanks in advance!!!

 

Dear Mladen/MrTools,

Can you please code an Indicator based on the below ...

I need a simple EMA indicator ... I want to plot 31 Day EMA on Daily charts and when the price closes above 31 EMA then a buy arrow and when price closes below 31 EMA then a sell arrow with alert feature...

It will also be helpfull if a histogram is created where in the Histogram is blue until the stock price is above 31 Day EMA and it turns to RED if the price is below the 31 day EMA...

Thanks a lot for the above Indicator ...

Cheers and happy weekend ..

Ganesh

 
rpasupathy:
Dear Mladen/MrTools,

Can you please code an Indicator based on the below ...

I need a simple EMA indicator ... I want to plot 31 Day EMA on Daily charts and when the price closes above 31 EMA then a buy arrow and when price closes below 31 EMA then a sell arrow with alert feature...

It will also be helpfull if a histogram is created where in the Histogram is blue until the stock price is above 31 Day EMA and it turns to RED if the price is below the 31 day EMA...

Thanks a lot for the above Indicator ...

Cheers and happy weekend ..

Ganesh

Ganesh, made this one.

 

Dear Mladen ;

I wanna change maney management as below but I dont know how to code it ,

if My profit is 10 pip , I would like to send close order such as Lots*0.1

if My profit is 20 pip , I would like to send close order such as Lots*0.2

if My profit is 30 pip , I would like to send close order such as Lots*0.3

if My profit is 40 pip , I would like to send close order such as Lots*0.4

Would you mind leading me to sample code or if possible , would you mind writing a code for above algoritm

thanks in advance

 
kemal44:
Dear Mladen ;

I wanna change maney management as below but I dont know how to code it ,

if My profit is 10 pip , I would like to send close order such as Lots*0.1

if My profit is 20 pip , I would like to send close order such as Lots*0.2

if My profit is 30 pip , I would like to send close order such as Lots*0.3

if My profit is 40 pip , I would like to send close order such as Lots*0.4

Would you mind leading me to sample code or if possible , would you mind writing a code for above algoritm

thanks in advance

kemal44

The problem with that kind of closing is that you can not know how many steps of closing has already been done on the order. We can not write in the comment field (which would be ideal so that on the order we could simply read the comment field and know what would be the next step)

So the only way is that you always open a fixed size order and if the size of the current order is 100%, 90%, 70%, or 40% size of the original lot size you know what to do. With variable lot sizes you can not know where you are (especially if you run two or more instances of the EA, if you run the EA from another terminal or you restart the EA)

 

Thanks Mladen , what if I always open 1 lot (fixed lots size) for Buy/sell , and instead of 3-4 level stoploss technic, I would like use 4 level tp/partitional TP , is there sample code for that?

thanks in advance

 
kemal44:
Thanks Mladen , what if I always open 1 lot (fixed lots size) for Buy/sell , and instead of 3-4 level stoploss technic, I would like use 4 level tp/partitional TP , is there sample code for that? thanks in advance

You can do simply something like the following :

if (OrderLots()==1.0) // code for first take profit

if (OrderLots()==0.9) // code for second take profit

if (OrderLots()==0.7) // code for third take profit

if (OrderLots()==0.4) // code for fourth take profit

Reason: