expert advisor - miscellaneous questions - page 7

 
#Lot Reset - Closed
Marco vd Heijden:

And for the other issue you can splice it into separate parts to set the state outside of sparam.

After your last comment, I fixed my issue.
( your comment very important )

Thanks so much more man. 

 

#ZORDER - Open

I already read some of 'ZORDER' from MQL4 documentation, but I still need a bit more explanation about that with example, please.

Thanks in advance. 

 

OBJPROP_BACK

Object in the background

bool


The objects are stacked on top of each other so its important to let chartevent () know which clicks on what button or objects have the highest priority over other objects that might overlap.

If you want your buttons to be on top of everything you place them on the foreground. Note that the most visible button has to be drawn last (!)

For example, you have made a nice set of buttons but your time and trend lines are drawn over the buttons which can be unwanted so you can raise the priority of the button to the foreground so that it will always be on top.

Then you can give the object you want to be clicked first the higher click order.

OBJPROP_ZORDER

Priority of a graphical object for receiving events of clicking on a chart (CHARTEVENT_CLICK). The default zero value is set when creating an object; the priority can be increased if necessary. When objects are placed one atop another, only one of them with the highest priority will receive the CHARTEVENT_CLICK event.

long

 

#Stop Loss / Take Profit - Open

Maybe I am tired, but I need to ask / get good advice from just professionals.
Just I am trying to get 'Take Profit 50 pips' and I can get it with below code, but I am not sure, that code is good / right or what, so please give me advice and if it's possible just a bit more with clearly explanation. ( because I am struggle to understand it )
( almost I spent over few hour for 'Take Profit and Stop Loss' value / size forums )

int    _TakeProfit_ResetValue = 50;
int    _TakeProfit = 50;
//---
double _TakeProfit_ResetValue =   _TakeProfit * MarketInfo( _Symbol, MODE_TICKVALUE );
// OR
double _TakeProfit_ResetValue = ( _TakeProfit * _lot_Min ) * 100;
//---

Thanks in advance.
 

Have you tried

_Takeprofit_ResetValue*Point

But its weird you declare int and double with the same name ?

According to the documentation it's still

NormalizeDouble(Bid-Point*TrailingStop,Digits)
But i'm not sure if that works in all cases.
 

Both myself and Alain have mentioned your horrible text formatting.

Is there any particular reason that you feel that you have to have a mix of colours, bold, italics etc?

 

What is a problem?
That is not for you, you can't understand that?
That is for me I need to quickly find my questions or asks or something else.

So what you want to try or for what? Is it your goals?
IF YOU DO NOT FEEL GOOD just LEAVE THIS PAGE. THAT IS IT just 'Ctrl + W'



Ok, fair enough. I can't be bothered to read some of your posts because it hurts my eyes.

If others feel the same, then you miss out, not me.

 
Keith Watford:

Ok, fair enough. I can't be bothered to read some of your posts because it hurts my eyes.
If others feel the same, then you miss out, not me.

Oh! Really sorry about that, I absolutely understand you. I am not try to hurts. But I can't spent a lot of time to read solid text to find my questions, subtopics, issues and so on.

( between I would like mention I really struggle to read on the computer, devices, and books - but I know something depends on read )

 

I don't mind at all Max and i find it great that you take the time to formulate your questions.

Perhaps the others would rather see something like this:

Max Enrik:

HI I NEED VLINE...  FAST !

PLAESE HELP ME !

Which happens more then often.

Did you succeed so far with that 'Take Profit 50 pips' issue ?

 
Marco vd Heijden:

I don't mind at all Max and i find it great that you take the time to formulate your questions.
Perhaps the others would rather see something like this:
Which happens more then often.

Did you succeed so far with that 'Take Profit 50 pips' issue ?

Haha! Thanks for your positive mind. Much appreciate.

( I will check out and test about ZORDER - but I have not enough time for it right now. Special thanks for your more informative comment. )

So no, I do not succeed with 'Take Profit 50 pips' ( also I am trying first Stop Loss before Take Profit ) issue - I already tried with your code, but I am not sure yet. Because two reason prevent me from Normalize().

#1 I caught Normalize() bug - and how it was happened - I was use it for Lot Step and I just saw sometimes Lot Step was jumped - e.g: ^ 0.01, 0.02, 0.04, 0.05, 0.07 - Normalize() ignored 0.03, 0.06, which one I saw.
#2 I read a lot Mr. Williams comments about Normalize() - he wrote look like this: Just Forget Normalize() exists.
That is enough to me for Normalize().

So, I need to share part of my Trade Panel EA's screenshot because I hope it will help to describe about my concern.


Just I am thinking if I use '_StopLoss = 50' this value won't work for 50 pips. But it is working good for 'Stop Loss Edit' which one I need.
Now, if I start to use pips (= Point) now it won't work for 'Stop Loss Edit'

So I lost my mind, what I could do, please give me good advice or help me.

Big thanks in advance.

Reason: