[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 291

 
uriy:
icas:

The rule of thumb is simple: deal with someone else's program yourself. Error 4107 - wrongly set SL (if memory serves me correctly (maybe TP), normalise the data when opening (modifying) orders, see
I already visited https://forum.mql4.com/ru/25607 I have been there, they gave me a nudge, but no results.

I went through the same thing (as all the others here)... A little more effort and everything will work out!!! We can help, more information is needed (e.g.: source). Also remembered: we should check MODE_STOPLEVEL, maybe it's bigger than suggested SL (TP).
 
uriy:
I do not know what to do with it, I just do not know what to do with it.
ERR_INVALID_PRICE_PARAM 4107 Incorrect price parameter for trade function


Look for an error in the order opening function. Or in parameters passed to it.

SZZ. I have looked at the code of this toy - it does not check the acceptable level of order placement - StopLevel. Although, the error will be 130 if the StopLevel limit is violated. Look it up and figure it out. But you cannot put it on the real account.

 

explain how iLowest or iHighest works???

int iHighest( string symbol, int timeframe, int type, int count=WHOLE_ARRAY, int start=0)

symbol - symbol name of the instrument, on data of which will be searched. NULL means current symbol.
timeframe - Period. Can be one of the chart's periods. 0 means period of current chart.
type - Identifier of timeframe. Can be any of time series identifier values.
count - The number of elements of the timeseries (in the direction from the current bar to the index increasing), among which the search should be done.
start - The index (offset from the current bar) of the start bar, from which the search for the highest value begins. Negative values are ignored and replaced by the zero value.

I don't understand the last one...

int iHighest(Symbol(),0,MODE_HIGH,7,0) - if I write it this way, does it mean that it will search for the maximal values starting from the current bar and ending 7 bars ago. Right?

or like this...

int iHighest(Symbol(),0,MODE_HIGH,7,7) - or this variant?

 
CLAIN:

explain how iLowest or iHighest works???

int iHighest( string symbol, int timeframe, int type, int count=WHOLE_ARRAY, int start=0)

Symbol - The symbol name of the instrument whose data will be searched for. NULL means current symbol.
timeframe - Period. Can be one of the periods of the chart. 0 means period of the current chart.
Type - The timeframe identifier. Can be any of time series identifier values.
count - Number of elements of the timeseries (in the direction from the current bar towards the index increasing), among which the search should be made.
start - The index (offset from the current bar) of the start bar, from which the search for the largest value will start. Negative values are ignored and replaced by zero values.

I don't understand the last one...

int iHighest(Symbol(),0,MODE_HIGH,7,0) - if I write it this way, does it mean that it will search for maximal values starting from the current bar and ending 7 bars ago. Right?

or like this...

int iHighest(Symbol(),0,MODE_HIGH,7,7) - or this variant?


iHighest(Symbol(),0,MODE_HIGH,7,0);
 
Vinin:



many thanks
 
splxgf:

And what will the script do?

Usually the terminal is unplugged, a CSV file is written from a non-standard timeframe and then loaded instead of any symbol and period, this is the period on which testing is done. It's true about the opening prices, but there are no other options.


Unfortunately, the terminal does not accept swaps))). When testing, it writes that there is no data for the required timeframe. I have tried to use import of another timeframe in the Quote Archive but nothing happens.

This leaves me with the EA-Script option.

 
ZZZEROXXX:


Unfortunately, the terminal does not accept swaps ))). When testing, it writes that there is no data for the required timeframe. I have tried to use imported data for the first time when I tried to upload a different timeframe.

That leaves the EA-script option.

Well, it will if you cheat. The file is renamed to whatever standard symbol the terminal knows. A piece of paper is written down for memory of who renamed what. The terminal is unplugged so that the fake quotes don't overwrite the real ones. You take out your scrap of paper, see what to test, and test it :))
 
ZZZEROXXX:


Unfortunately the terminal does not accept swaps ))). When I do a test it says there is no data for the required timeframe. I've tried to use some other timeframe in Quotes Archive but nothing happens.

This leaves the EA-script option.

If this doesn't work, finally read the documentation

https://www.mql5.com/ru/articles/1368

 

granit77, splxgf

Well, that's what I did, logically. Except for one but - tried to import.hst with the TF I wanted, but it wouldn't eat it. I'll try with .csv as instructed. (But that's nonsense, right.)

Thanks for the link.

 
ZZZEROXXX:

granit77, splxgf

Well, that's what I did, logically. Except for one but - tried to import .hst with the TF I wanted, but it wouldn't eat it. I'll try with .csv as instructed. (But that's nonsense, right.)

Thanks for the link.

The link is brilliant. Dmitry rules. Already half the forum is doing so, and you're still slowing down :))
Reason: