Useful features from KimIV - page 32

 

На функцию мне в принципе по боку, можно сказать одно :), не буду оригинален и скажу как всегда :) -- слишком перегружена.

I don't give a damn about the expert! That's the difference!
I haven't tried to lay out a profitable strategy or any other strategy. I want to create a universal function SetOrder - which will handle all errors.
I am making a universal tool that will serve me well in the future. I don't want to step on the same rake several times.

A neural network -- first of all, it never produces a flat signal.

I don't know why you think that either. Mine, of course, may not (not really mine, of course, but Reshetova's).

1. If you disable the Expert Advisor, it will not work until it is restarted. Why not wait for a relatively long period of time?

Thank you for that! I hadn't thought of that. I took this block as it was done from Igor.


I DON'T WANT TO STEP ON THE SAME RAKE SEVERAL TIMES.)

 

Насчет универсальности -- в простом коде сложнее допустить ошибку.

Of course, it's harder to make a mistake in a simple one. But will a simple code be able to work in real money.
You will never be able to handle all those errors which just
should be handled when working on a real account with a simple little compact code or whatever you want to call it. It's clear that when it's not about money everyone makes simple
advisors without checking for any errors.
I just want to write a universal function once that I will be 100% sure about and use it later. Whether it's big or small

does not play a role in this case.

For everything else, I absolutely agree with you.

Flubbin' flubbin'... :)

 
dunaj писал (а) >>

Hello Igor!

I have been following YOUR thread for a long time and with great interest,

and if I haven't written a word of thanks so far, it's only because

I didn't want to distract with unnecessary emotions.

However, over the last few pages the situation in the thread has, in my opinion,

out of control. What has happened?

Have you completely lost interest in the cause you started? I can't imagine that!

Are you waiting for the flaming to die down? Your intelligence prevents you from stopping

from raising your ratings at your expense?

Igor, forgive my harsh tone. I think too highly of you as an expert to allow me

I can't afford to lecture you. You know what you are doing! Please don't forget the readers,

waiting for YOUR branch to develop. Your work is needed by many.

Specifically, I suggest the following.

1. Remove anything irrelevant from this thread.

(Move it to another? As much as you like! I won't read it anyway...).

2. Do not allow similar distractions from the topic in the future.

Allowed to QUESTION if some functions can not be used as you suggested.

3. if someone decides to warn us, the unwise, against using a certain function under conditions

in his/her opinion, inadequate, you are welcome. But only in the form of a short comment.

Perhaps with a reference to a detailed article. Spare us the discussion in this thread.

4. Delete this post after clearing the branch as having no meaning.

Hello all! Gentlemen! Help, because I have basically looked through everything, but could not find an answer to a seemingly simple question... There is such a sequence [or function - as you like...] : A1<A2;A2>A3;A3>A4;... FOR SALE...or A1>A2;A2<A3;A3<A4;....Buy....How to describe it in MT-4? 2.HOW to describe comparison of different time intervals by these sequences, and is it even possible???

 
TheXpert писал (а) >>

Well in the author's code the signals were called Up Downl and Flat, well I called them accordingly.


2 signals is evil!!! Of course I need 3 signals.

Besides, I do not consider a linear perseptron to be a network at all.


I suggest that we unanimously delete what we have rambling on here so as not to litter the thread.

'Neroset what are the inputs and outputs and just a bit about neural networks'.

let's move over here!

I urge all participants in the DISCUSSION about neural networks to move from Igor's thread!

i deleted my posts ...

PLEASE follow suit

---

 
dunaj писал (а) >>
What happened?
have you completely lost interest in the cause you started?

No, I haven't lost interest yet. I plan to keep the thread going until autumn (September/October), and I will gradually post all my features. About half of it is posted so far.

dunaj wrote (a) >>

Waiting for the flaming to die down? Your intelligence doesn't allow you to stop

those who want to raise their ratings at your expense?

Nothing against off-topic posts as I myself have sinned.
 
KimIV писал (а) >>

No, I haven't lost interest yet. I plan to keep the thread going until autumn (September/October), and I will gradually post all my features. So far about half of it is posted.

I have nothing against off-topic posts as I have sinned myself.

Igor sorry bastards! It's just sometimes any topic smoothly or sharply wanders in another direction!

Second time I try to take away from your thread conversations off-topic!

 
KimIV писал (а) >>

No, I haven't lost interest yet. I plan to keep the thread going until autumn (September/October), and I will gradually post all my features. So far about half of it is posted.

I have nothing against off-topic posts as I myself have sinned.

Dear! I'll take the liberty of asking you to shift the order of the functions, and if it's not a problem, answer just two, hopefully, solvable questions - moreover, on the subject, I've already asked above, but I dare to repeat them:

Hello Gentlemen! Help, because I have basically looked through everything, but did not find an answer to seemingly simple questions... There is such a sequence [or function - as you like...] : A1<A2;A2>A3;A3>A4;... SELL...or A1>A2;A2<A3;A3<A4;....Buy....How to describe it in MT-4? 2.HOW to describe comparison of different time intervals of these sequences, and is it even possible??? That's what I mean... There is an idea to create an EA with such formal description: ..................................................................... 1.Indication of indicators that may be used in the Expert Advisor and their description. .................................................................................................................................................. 2.Comparing the properties of different timeframes on the chart, such as day, 4 hours, 1 hour. ................................................................................................................................................... 3.Establishing the concept of whether there is a trend according to the formula: A1<;A2>A3;A3>A4; i.e. searching for the change of trend on timeframes mentioned above... Type: True-False, True if there is a break on 1 hour, 4hour and day, False if there is a difference on any timeframe. Instead of the above intervals you may put smaller ones, such as 5 min.Instead of above mentioned timeframes, you can set smaller ones, like 5 min, 15 min, 30 min. the result should be the same, but the level of stops will be definitely lower. This is for sale............................................................................................................................................. 4.Determining the superposition point, i.e. where the price is relative to the previous max. or min. in a given period of time. If it is near the proven max. but breaks through it, or the sequence is not confirmed, then there is no sale, also if the price is near the proven max., then there is no purchase. For the time period = 1 month is taken as the definition, because the work is done at max. counted schedule = 1 day - no more. ........................................................................................................................................................................................................................................ 5. Determination of lot size + whether there is free money to open a position........................................................................................................................................................ 6.Determination of initial levels trailing - stop, as the stop should be equal to 50% of the last daily candle - at least in case of advisor according to variant 1 and 12.5% according to variant 2.......... 7.Define 1 level of trailing stop, when it reaches a certain amount of profit and set it to no loss, or + 1 pip ........................................................... 8.Determination of the last trailing stop level, when a certain amount of profit is reached and following the price, only in the direction of the movement, but with a backward move that closes the position...................................................................................................................................................................................................................................................................... 9. Determining the position by closing if there is a buy by formula:A1>A2;A2<A3;A3<A4;............................................................................................................................................................... 10.Everything again, as only 1 position can be opened for 1 pair....

 

The SetHLine() function.

This function sets the OBJ_HLINE horizontal line object on the current chart.

  • cl - Color of the OBJ_HLINE horizontal line object. Required parameter.
  • nm - object name. If the default value "" is passed, the open time of the current bar is used as the object name.
  • p1 - price level of the object. Default value - 0 - current Bid price.
  • st - Line style. Admissible values are STYLE_SOLID (by default) - solid line, STYLE_DASH - dashed line, STYLE_DOT - dashed line, STYLE_DASHDOT - dashed line, STYLE_DASHDOT - dashed line with double dots.
  • wd - Line thickness. Default value is 0.
//+----------------------------------------------------------------------------+
//|  Автор    : Ким Игорь В. aka KimIV,  http://www.kimiv.ru                   |
//+----------------------------------------------------------------------------+
//|  Версия   : 30.03.2008                                                     |
//|  Описание : Установка объекта OBJ_HLINE горизонтальная линия               |
//+----------------------------------------------------------------------------+
//|  Параметры:                                                                |
//|    cl - цвет линии                                                         |
//|    nm - наименование               ("" - время открытия текущего бара)     |
//|    p1 - ценовой уровень            (0  - Bid)                              |
//|    st - стиль линии                (0  - простая линия)                    |
//|    wd - ширина линии               (0  - по умолчанию)                     |
//+----------------------------------------------------------------------------+
void SetHLine(color cl, string nm="", double p1=0, int st=0, int wd=1) {
  if (nm=="") nm=DoubleToStr(Time[0], 0);
  if (p1<=0) p1=Bid;
  if (ObjectFind(nm)<0) ObjectCreate(nm, OBJ_HLINE, 0, 0,0);
  ObjectSet(nm, OBJPROP_PRICE1, p1);
  ObjectSet(nm, OBJPROP_COLOR , cl);
  ObjectSet(nm, OBJPROP_STYLE , st);
  ObjectSet(nm, OBJPROP_WIDTH , wd);
}
 

Examples of how to use SetHLine().

  1. Yellow solid horizontal line at the current price.
    SetHLine(Yellow);
  2. Red thick line at the current day's opening price.
    SetHLine(Red, "", iOpen(NULL, PERIOD_D1, 0), STYLE_SOLID, 3);
  3. A grid of dashed lines below and above the current price.
for (int i=-5; i<6; i++) {
  SetHLine(Coral, "HLine"+i, Bid+i*20*Point, STYLE_DOT);
}
ZS. Attached is a script to test the SetHLine() function.
Files:
 
Geronimo писал (а) >>
Igor, is there a function that calculates area?

no