[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 310

 

I couldn't find it on the search, unfortunately.

Please tell me how to set a shift of +0.21% and -0.21% in МА parameters. I want to set an envelope of 3 MAs for a chart with the period 34 and shift 0, +0.21% and -0.21%. I have no problems with the first one :) because the shift is zero, but the two following ones do not want to be set. I tried to change it to a number, for example 21, but the result is the same.

 


for (int i=3; i<100; i++){
 if(iFractals(NULL,0,MODE_UPPER,i) > iMA(NULL,0,13,0,MODE_SMA,PRICE_HIGH,i)) {
 Price_Up = NormalizeDouble(iFractals(NULL,0,MODE_UPPER,i), Digits);
 u=i;
 break;}}

if(Price_Up!=0){ 
for(i=2; i<u; i++) {
if (Price_Up < High[i]+5*Point) Price_Up=0; 
break;}}

Help, why doesn't it want to reset the variable in the second loop, what's wrong here? It should reset if price has exceeded the Price_Up level by 5pp.

 

Hello!

Please advise professionals, I am testing the Expert Advisor for 2 months, deals should be every day (term from 23.08.10 to 23.10.10). But the tester shows me the results, that there were only 10 deals, and the last only 03.09.10) Shows profit. But when I connect visualization, there are already 20 deals and losses, but also not enough.

 
Hello. How can I push the terminal to update the quotes on a timeframe that is not currently open? I don't know, maybe there is no such function, but maybe there is a way to do it indirectly. If you know, tell me or at least show me the direction to go. I would be grateful:)
 
Postponed.

konstanta:

how do i prescribe or what should i fix in my Expert Advisor so that it does not open trades in both directions at once when i run it?


Sys15975382:

I want to disappoint you, my personal psychic went to work at 9:00.
P.S. Send me the Expert Advisor.

 
Sys15975382:

Хочу тебя огорчить, мой личный экстрасенс ушел на работу к 9:00.
P.S. Советника скинь


My psychic is not doing anything. The answer is pretty much obvious: Make sure that the conditions for opening opposite trades are not fulfilled simultaneously.)
 
Sys15975382:

For your purposes you need to remember the past tick and the current tick. I would like to warn you that this method will only work successfully on demo or real. The strategy tester is designed so there is no ticks or random generation of ticks (the same "gibberish" in a row). Try to download the minute history and run the owl with only Print(",Bid," ",Ask);

Thanks a lot!

However, I think that

double TickLast=TickNow;                       Здесь, наверно, если TickNow определен ниже, то сейчас он = 0

double TickNow=Bid; 

if (TickNow>TickLast) { tickUP=1; tickDN=0; }

if (TickNow<TickLast) { tickUP=0; tickDN=1; }

if (TickNow==TickLast) { tickUP=0; tickDN=0; } Такой ситуации не бывает 

Но в общем просто и ясно! ОК!

 
Good people! Please send me the code of the cycle where the High [i] of a particular candle is tracked. Took me two days, I give up!
 

Good evening all. When optimising an EA for a week there is a result and a graph, but for a fortnight there is nothing-optimisation is stopped. Can you please tell me what this may be and how to fix it? Thanks in advance!


 

This question - a binary file stores an array of "unknown" length (when writing to the file, the size of the array can change from time to time - depending on the conditions at the time of saving). When reading data from a file into an array

FileReadArray( int handle, object &array[], int start, int count)

it is necessary to specify the array size (count).

If count is set too large, the array will get a lot of null values (right?) and a new loop will probably be needed to

I think I will need a new loop to get rid of them...

- Is it possible to find out the number of array elements in a file? How to avoid unnecessary actions in this case in general?

Thank you!

Reason: