Requests & Ideas, the beginning - page 211

 
FNF2:

Hi mladen 

please , can you help me to add option ( invert ) to this indicator

thanks in advance for your help ….. best regards .

Use this one (set the SmoothExtra to <= 1 to get the same results) . This version does not need the library. Invert option added

 

Thank you very much mladen .

really thanks .

 
mladen:

Depends what exactly you wish to accomplish

It is is to stay locally visible within the body of a function or procedure, then that is a very good way (and keeps the possibility of error at minimum)

I've solved the problem with resseting on chart change (thanks for your tutoring).

Any tips for making buttons (click on)/(click off) on pressing... (I know you know :))

 
knaimad:

I've solved the problem with resseting on chart change (thanks for your tutoring).

Any tips for making buttons (click on)/(click off) on pressing... (I know you know :))

You have to check the state of the button before you set the state of the button to false. And then, if the state is true, the button is pressed and if the state is false, the button is not pressed
 
redwed:

Hello mr mladen. I have an indicator request to be made.

Is there any indicator that make the crosshair in mt4 will never disappear. I'm doing some study from past charts, it annoys me straight away when i need to click CTRL+F every time i clicked on any objects in the chart.

Is there any special indicator that allows crosshair (and all its functions - mainly drag to show pips count) to be permanent?

Any help for this?
 
redwed:
Any help for this?

redwed

That can not be done from mql

 
mladen:
You have to check the state of the button before you set the state of the button to false. And then, if the state is true, the button is pressed and if the state is false, the button is not pressed

Almost there...

I've done this:

 if(ObjectGetInteger(ChartID(),sparam,OBJPROP_STATE))

          { ObjectSetInteger(ChartID(),sparam,OBJPROP_STATE,true); }

       else

          { ObjectSetInteger(ChartID(),sparam,OBJPROP_STATE,false); }

is there any posiibility for the button to return to false state say after few miliseconds (to make it only flash click)? 

 
knaimad:

Almost there...

I've done this:

 if(ObjectGetInteger(ChartID(),sparam,OBJPROP_STATE))

          { ObjectSetInteger(ChartID(),sparam,OBJPROP_STATE,true); }

       else

          { ObjectSetInteger(ChartID(),sparam,OBJPROP_STATE,false); }

is there any posiibility for the button to return to false state say after few miliseconds (to make it only flash click)? 

No. When you use the ObjectSetInteger() for the state, you change the state of the button. No need for that. Do simply the following :

 if(ObjectGetInteger(ChartID(),sparam,OBJPROP_STATE))
{
   //
   // code part that has to do something when the button gets pressed (clcked on)
   //
}
 
mladen:

No. When you use the ObjectSetInteger() for the state, you change the state of the button. No need for that. Do simply the following :

Loads of thanks
 
mladen:

Try it out now

please mladen i hope I'm not asking for much..can you make a simple expert advisor buy and sell on signal..thank you in advance.with Trailing and stoploss and take profit.
Reason: