[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 608

 
if(OrderTakeProfit()!=0&&OrderTakeProfit()!=OrderOpenPrice()+2*kio*Point&&Bid>OrderOpenPrice()+50*kio*Point)
               OrderModify(OrderTicket(),OrderOpenPrice(),OrderStopLoss(),OrderOpenPrice()+2*kio*Point,0);
Hi all. Can you tell me what's wrong with Error #1 how to fix it? thank you!
 
laveosa:
Hi all. Can you tell me what's wrong with Error 1? Thank you!

is this spam? You have already asked this question and it has been answered (page 602).
 

cp don't pay attention :) I'll have a look if there are any questions I'll knock on the door!!!!

 
rigonich:


Do not work on the zero bar, there is no other way.

P.S. In general, this is the main problem with all indicator strategies. Every indicator lags. Some are more sensitive and some are less sensitive. The more sensitive the indicator __ the more false positives it has. If the sensitivity is low, it misses most of the movement, and as a result the profit is decreasing, if it is high, the losses will increase due to false operations. In order to find the "golden mean" the optimization of parameters is performed. Operation on the zero bar increases the sensitivity of the indicator not gradually, but sharply, with all that implies.


Thanks again! I will think and try...
 

Please advise how to make an entry to the file.

While the EA is running, it calculates the value of 4 variables whose values are stored in memory, and if the terminal is not overloaded, everything is fine. However, after restarting the terminal, it loses these values and on the first start they all ==0 again.

What I need to do is to make it so that on the first startup it reads values from the file and then, if they change during the operation, it saves the new values back to the file. And it should create a file with a unique name, maybe derived from a currency pair, because there are a few Expert Advisors in the client terminal and the new values should not interfere with each other.

The Expert Advisor was made by a person who is currently unavailable to me, and the issue is important because real money may be lost. I can give you a piece of code where these variables are calculated, if someone will write me immediately how to write them into a file.

 
rigonich:

Next top fractal.

Thanks for the reply, but I meant how do I know if the current fractal has been broken or not before the next fractal appears
 
xant:

Please advise how to make an entry to the file.

While the EA is running, it calculates the value of 4 variables whose values are stored in memory, and if the terminal is not overloaded, everything is fine. However, after restarting the terminal, it loses these values and on the first start they all ==0 again.

What I need to do is to make it so that on the first startup it reads values from the file and then, if they change during the operation, it saves the new values back to the file. And it should create a file with a unique name, maybe derived from a currency pair, because there are a few Expert Advisors in the client terminal and the new values should not interfere with each other.

The Expert Advisor was made by a person who is currently unavailable to me, and the issue is important because real money may be lost. I can give you a piece of code, where these variables are calculated, if someone will write me immediately how to write them into a file.


Use GlobalVariable terminal variablesThey save the values when the terminal is reloaded .

Write more details how to use them?
 
i999i:

Thanks for the reply, but what I meant was how to know if the current fractal has been broken or not before the next fractal appears

The previous fractal may not be broken through before the next one appears in the same direction. Please read Williams again. He details different ways to work with fractals.
 
rigonich:

The previous fractal may not be broken when the next one appears in the same direction. Read Williams again. He describes in detail the different ways of working with fractals.

I would still like to know how to determine whether the price was above the value of a fractal from the moment of its occurrence to the current time
 
i999i:

I would still like to know how to determine if the price was above the value of a fractal from the moment of its appearance until the current time

int iHighest( string symbol, int timeframe, int type, int count=WHOLE_ARRAY, int start=0)
Returns the index of the highest value found (offset relative to the current bar).
Parameters:
symbol - Symbol name of the symbol, the data of which will be searched. NULL means current symbol.
timeframe - Period. Can be one of the periods of the chart. 0 indicates the period of the current chart.
type - The identifier of the timeseries. Can be any of the timeseries identifiers.
count - Number of elements of the timeseries (in the direction from the current bar to the ascending index), among which the search should be performed.
start - The index (offset from the current bar) of the start bar from which the search for the highest value will start. Negative values are ignored and replaced by zero values.