[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 783

 
artmedia70:
Thank you. Yes, Alexey, of course... Those commonplace truths are certainly understandable... And the problem is laid out in the previous post...


You can forget about MODE_FREEZELEVEL. Throw this script on the chart (I doubt you'll get a value other than zero)

int start(){
  double FrizLevel=0;
  string SMB=Symbol();
  Alert("--------------------------------------------");
  FrizLevel=MarketInfo(SMB,MODE_FREEZELEVEL);
  Alert("FrizLevel = ",FrizLevel);
  Alert("---- 0_",SMB," ----");
  return(0);
}

If you hadn't mentioned the MODE_FREEZELEVEL parameter, I wouldn't have remembered about it. I've made a lot of codes with locking pending orders. A stop loss was quite enough. And the DC probably won't bother with it.

 
drknn:


You may forget about MODE_FREEZELEVEL. Throw this script on the chart (I doubt that it will show a value other than zero)

If you hadn't mentioned the MODE_FREEZELEVEL parameter, I wouldn't have remembered about it. I've made a lot of codes with locking pending orders. A stop loss was quite enough. And your brokerage company will probably not bother with it.

No Vladimir, I can't throw it on. If I had my Expert Advisor designed for me, I would not bother with it at all... because I know that it's about nothing... But the customer's value is present and varies...
That's the problem... I could certainly advise him and his trading methods to change brokers, but... it's not my business... It's my business to do it with his kitchen in mind... That's what I'm worried about... :)
 
artmedia70:
StopLevel is the minimum setting distance of the stops/sticks...
But what's not so clear to me about FreezeLevel. What exactly is to be taken into account here? And most importantly, how?

If I understand correctly, if price gets close to the stop/stop and enters the FreezeLevel corridor, the stop is no longer off the pose... The only thing left to do is to smoke bamboo and wait for either a stop closure or retracement and the price moves out of the freeze corridor. Then I do not understand how to account for this corridor to be able to withdraw a stop in time... It turns out that the criterion of stop removal may not occur before entering the freezing corridor, but what if it occurs and we are already in the corridor? So we should think about it before the corridor... What about before, if the criterion is clearly defined, but it can already be triggered in the freeze corridor... And if I take it off before the freeze, and the price turns around and... then I shouldn't have taken it off... Do I have to put the stop back in place? And if this mess continues... The price goes back and forth... and I'll run the stops back and forth... until the DC bans auto-trading from here...

That's a mess... I didn't think about it, everything was clear... When I thought about it, I went into reset... for a long time, it seems... :)


1) Yes, you understand correctly.

2) Usually stops are driven either "there" or "there", but not "there and there" :)

If the strategy you are implementing involves frequent modification of stops, think about virtual stops. Let the Expert Advisor store the stop levels and keep an eye on the price.

 
PapaYozh:


1) Yes, you understand correctly.

2) Stops are usually driven either "there" or "there", but not "there and there" :)

If your strategy involves frequent modification of stops, consider virtual stops. Have the EA store the stop levels and keep an eye on the price.

Well, at least one good thing is that I get it right after all... :) Thanks for the idea of virtual stops. I'll have to think about it... But my first thought was, what good are they if we're sitting in a corridor freezing... in waiting anabiosis... :)
It's all the same whether it's a real stop or an "in mind" stop... stop... but no... it's not all the same. We don't want to close, we just want to remove the stop...
We're going the right way, comrades! (V.I.L.) ... I'm glad we have such a fateful consensus... (M.C.G.) ... :)
Thank you - it's a great idea! I'll do it!
 

hello....

could someone throw a code that when x condition is fulfilled (let's say cloze below 20 muving)

would open a Sell.... order with a specified stop and takeaway, let's say 20 and 30 pips and at the same time would put a stop on a distance of x pips from the first order? The Tilt has also set stops also let it be 20 and 30 pips....

Thank you for your attention

 
plus adjustable lots))))
 
TONY_TRADER:

hello....

could someone throw a code that when x condition is fulfilled (let's say cloze below 20 muving)

would open a Sell.... order with a specified stop and takeaway, let's say 20 and 30 pips and at the same time would put a stop on a distance of x pips from the first order? The Tilt has also set stops also let it be 20 and 30 pips....

Thank you for your attention

Do you need a ready-made code? Or are we learning to program?

If the second, then:

1. read a textbook;
2. check Igor Kim's thread - you may find a lot of useful ready-made solutions to start your "career" ...

Good luck!

 
thanks!!!! very good thread)))
 

Do you know if it is possible to practice with metaeditor or other editors using simple examples.... they are described in the textbook... but is it possible to display in the editor the answer of a simple math problem... for example finding the hypotenuse... or something else... how to display the answer in such problems... and is this even possible?

i tried a metaheditor ... it only shows if the program is correct but not the answer((( maybe someone knows about it????

 
TONY_TRADER:

but the answer doesn't come up((( maybe someone knows about????

https://docs.mql4.com/ru/common/Comment
Reason: