Coding help - page 153

 

Goodevening MLaden,

Is it possible to combine 2 indi's into one? I have the 2 in overlay but it is not so nice to see it like this but could be helpfull?

The indi's are: DSS Dressert and the indi I sent you this afternoon the High Low Trend MTF. It would be very nice to get the high low signal on the lines of the DSS Bressert.

Hear from you and thx.

Marco

 
Marco320:
Goodevening MLaden,

Is it possible to combine 2 indi's into one? I have the 2 in overlay but it is not so nice to see it like this but could be helpfull?

The indi's are: DSS Dressert and the indi I sent you this afternoon the High Low Trend MTF. It would be very nice to get the high low signal on the lines of the DSS Bressert.

Hear from you and thx.

Marco

Marco

Take a look at the values that DSS is ranging in (the minimum and the maximum) and then see what are the values that are results of high low trend indicator. You can combine indicators that are having same or similar ranges. Indicator with ranges that are too different can not be combined in a meaningful way

 
mladen:
Marco Take a look at the values that DSS is ranging in (the minimum and the maximum) and then see what are the values that are results of high low trend indicator. You can combine indicators that are having same or similar ranges. Indicator with ranges that are too different can not be combined in a meaningful way

Hello MLaden,

Attached a picture including the indi's. The input I want to use for DSS is 3-13 and for the High-Low trend will be around 12. Having the signal on the lines of the DSS by the High - Low trend would be very nice. Allthough I looked after the ranges I really don't know how to programm it eventually. If you to a look at the High - Low trend points you'll see what I mean by getting it on line of the high and lows of the DSS. The so called bands are not necessary to have because of the difference of each indi and the working.

I'm curious if this can be done and hope to hear from you.

Regards Marco

PS High - Low trend I convert to separate window myself

 

Marco

Let me try to explain again :

When you do what you did on that picture then metatrader fits the drawn values to a pixel wise determined height of the window. Those value have nothing in common with each other (values of high low trend are not even close to the values of DSS - they are just equalized in height by metatrader to that maximum height in pixels - PS observe how relative values of the indicator change on each new extereme value of the high low trend indicator - scroll through the chart back in the history in you will see what happens)

If you calculate two indicators in one, then the values are left in their original state or they are "normalized". if they are left in the original state, at that picture you would have a normal DSS and one flat line at about 1 representing the high low trend (since those are the "natural" values of high low trend on symbols like EURUSD, GBPUSD, USDCH and similar, or you would ghave a flat line at 98 for USDJPY) Normalizing high low trend (in order to fit in 0 to 100 range) would deform high low trend values and then it would not look at all like a normal high low trend

PS: you can do the following that will allow you to see what am I taking about immediately - right click on that high lo trend in the subwindow and set 0 in the fixed minimum and 100 in the fixed maximum property of the indicator. That is what you would get in that case (see the example picture of such a setting)

Files:
sub_window.gif  61 kb
 

Dear Mladen;

idea is that if price break Resistance level , I wanna submit sellstop order which is equal R3 price, how can I define that logic in my expert?if you help me , really appriciate that.

thanks...

 
kemal44:
Dear Mladen;

idea is that if price break Resistance level , I wanna submit sellstop order which is equal R3 price, how can I define that logic in my expert?if you help me , really appriciate that.

thanks...

kemal44

You can use something like this :

double ressp = iCustom(NULL,0,"indicator name",....,bufferNo,2);

double ressc = iCustom(NULL,0,"indicator name",....,bufferNo,1);

double r3 = iCustom(NULL,0,"indicator name",....,bufferNo,1);

if (High[2]ressc) open sell stop using r3 as a opening price

 
mladen:
Marco

Let me try to explain again :

When you do what you did on that picture then metatrader fits the drawn values to a pixel wise determined height of the window. Those value have nothing in common with each other (values of high low trend are not even close to the values of DSS - they are just equalized in height by metatrader to that maximum height in pixels - PS observe how relative values of the indicator change on each new extereme value of the high low trend indicator - scroll through the chart back in the history in you will see what happens)

If you calculate two indicators in one, then the values are left in their original state or they are "normalized". if they are left in the original state, at that picture you would have a normal DSS and one flat line at about 1 representing the high low trend (since those are the "natural" values of high low trend on symbols like EURUSD, GBPUSD, USDCH and similar, or you would ghave a flat line at 98 for USDJPY) Normalizing high low trend (in order to fit in 0 to 100 range) would deform high low trend values and then it would not look at all like a normal high low trend

PS: you can do the following that will allow you to see what am I taking about immediately - right click on that high lo trend in the subwindow and set 0 in the fixed minimum and 100 in the fixed maximum property of the indicator. That is what you would get in that case (see the example picture of such a setting)

Hello MLaden,

Thx I do understand your explanation now.

Regards Marco

 

Help to Req EA simple Hedging Marti

Hello All

I have Good Trading System

Some one can help to be EA

first Open Posision is BUY with Lot 0.1 (x1) (can edit)

EA will make Pending Order Sell Stop at 10 Pips (Can Edit) below with lot 0.3 (x3)

if Pending Order Sell Stop was taken

EA will make Pending Order Buy Stop double Pips from Sell Order 20pips above with lot 0.6 (x2) from 2nd Lot

and soon. with lot x2

only lot 2nd position x3

ex. lot

1.3.2.2.2.2.2.2.2...

No Stop Loss

about TP = TP use 2% Equlity Target from Total Fund

Thanks..Thanks..

Very Very Thanks..

 

Hello MLaden,

1. By testing this EA it won't take the profit or losses on a regular basis. Only when the EA is closed by testing on historical data, it will close all open orders. Can you take a look what can be going wrong or do I have to change the input, but which one because changing TP and SL are given more worth results, even no results at all.

2. Could you inform me where I can find a proper guide to build an EA. I would like to build the EA for the High - Low trend mtf & alerts (the indi I sent you earlier) and maybe you are be able to help me with this issue.

Thx Marco

Files:
 
Marco320:
Hello MLaden,

1. By testing this EA it won't take the profit or losses on a regular basis. Only when the EA is closed by testing on historical data, it will close all open orders. Can you take a look what can be going wrong or do I have to change the input, but which one because changing TP and SL are given more worth results, even no results at all.

2. Could you inform me where I can find a proper guide to build an EA. I would like to build the EA for the High - Low trend mtf & alerts (the indi I sent you earlier) and maybe you are be able to help me with this issue.

Thx Marco

Marco

regarding EA building - see these threads :
https://www.mql5.com/en/forum/173136

https://www.mql5.com/en/forum/173171