[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 850

 
Mathers:

Every time I open a new chart - it opens on the H1 timeframe at the smallest scale and with bars.

Accordingly, every time I click to zoom in on the chart, change the bars per candle, and change the timeframe.

Question: Can I set it so that the chart is always open on a minute timeframe immediately in the form of candlesticks and the like?


Of course you can.

Create a Default template with the required settings

 

People of goodwill, please help me with two questions.

1) How to add a code for drawing lines in an indicator or ssi (like in devirgence), let's say one hump is higher and the next one is lower,. well, and from one vertex in this situation to draw a line to another vertex. Help is required not in solving the problem, but in how to draw a line, ... where and what coordinates to take for a straight line.

2) I will be grateful in advance for the code of time trade

 

why did my EA on optimisation give out in the log : 2 passes passed, 768 rejected as insignifikant ? do they mean drain or other reasons ? because negative results are also published...

 
Infinity:

People kind help to deal with 2 questions.

1) How to add a code for drawing lines in an indicator or csi (like in devirgence), let's say one hump is higher and the next one is lower,. well, and from one vertex in this situation to draw a line to another vertex. What I need help with is not solving the problem but how to draw a line... where and which coordinates to take for a straight line.

ObjectCreate + WindowFind

Time coordinates are bars on which a diverter is detected and values are vertex values themselves,

+ determine in which window your ssi or macd. you will need to search by window name.

 

I see,... searching for the window name must have been the problem,... it's always just a straight line in the window or it's not clear.

Can you tell me the time code? To make the Expert Advisor trade only within a certain timeframe .... I have a problem comparing current time with suggested time. I converted it to date type and it still fails.

I also have another question. I tried to write 2 conditions in the function of closing an order by a condition ( || - or), but only one of the prescribed methods works. Is this implementation even correct?

 
Dms2:

Hello everyone.

This is my first time writing here and I registered specifically to ask.

Story: "Cut off losses and let profits grow; hope dies last - so kill it first".

From my experience of manual trading: I opened, and now I'm in the red. Stop = take and = 100p, trawl = 15p (or 25-20 is not important). Negative balance bounces back and forth, my hands are tied by open positions and only hope says: well, it will go to the trawl, well, a little more. What is the result? We have not closed orders at take (+100p). But stop loss (-100 points) is not frequent, trailing 3-5-20-50 points occurs frequently. As a result slowly, but surely we are losing.

So I thought: what if I change trade to the opposite - i.e. I stop trailing (because in this case I do not want to increase profit by trailing), but when I am in red zone - I take a TP. In this case we should decide at what level the position will be loss-making rather than profitable and take a trailing TP after new negative extremums (you can also leave it to take a stop lossless position). If we trawl not a stop loss but a take one - perhaps there will be an opposite trend - a slow, confident growth of the deposit?

The essence of the idea: to create [advisor] trailing take, which is automatically activated at a specified level of loss on a deal [in pips] and sets take profit by itself at the same value [or set]. With further increasing of loss the take is retraced - generally it's like in trailing stop, but vice versa.

In general, if any of programmers find this idea reasonable, and if someone writes such an assistant... ...I'll be waiting for your opinions.


I've got such an EA in development, you can trade with a BIG deposit, leverage and a small lot 0.01 and a profit of about 12 per cent a year (go to the bank), the risk of getting MARGINCOLL is great (martin). The question to experts: why is everything good in the tester, but the demo does not work? and I have to refine it so I have to rewrite everything from scratch, everything turns out wrong, just horror?
 

Please advise on the correct way to write it in the advisor.

double CHO = iCustom(NULL, 0, "Chaikin Oscillator("+10+", "+3+", "+0+")", 0, 0); - it doesn't give values.

What is the error?

Indicator https://www.mql5.com/ru/code/7761

 
DhP:

Please advise on the correct way to prescribe in the advisor.

double CHO = iCustom(NULL, 0, "Chaikin Oscillator("+10+", "+3+", "+0+")", 0, 0); - it doesn't give values.

What is the error?

Indicator https://www.mql5.com/ru/code/7761

double CHO=iCustom(NULL,0,"CHO",10,3,0,0,0);
 

I have a standard function in my Expert Advisor to send an order

            ticket = OrderSend( бла-бла );
            if(ticket > 0)
               Print("Ok");
            else
               Print("failed with error #",GetLastError());

Today I have found error 128(Trade timeout) in the logs but nevertheless my order has been opened and since the logic of the code did not imply any actions in case of no order opening, it was hanging there until I have found it myself. I guess the server gave an error but the order was opened. Is it possible or am I glitching? And if not me - how to deal with it.

 
Mathers, most likely there was an error on the first ticks and then the order opened. In general, the terminal may give out errors on its own, even if there are no printers in the code.
Reason: