Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 624

 
laveosa:

If I understood correctly, the same as mentioned above 150...

In addition to the period there is also the type. Not every waving can be obtained quite accurately on other timeframes. On smaller ones you can, on higher ones not so much
 

here is a new variant that does not wrap up with minima maxima....

int MaperiodM5maBIG_1,

MaperiodM5maBIG_2,

MaperiodM5ma_1,

MaperiodM5ma_2;

if(Period()>1){

MaperiodM5maBIG_1 = 750 / Period();

MaperiodM5maBIG_2 = 750 / Period();

MaperiodM5ma_1 = 25 / Period();

MaperiodM5ma_2 = 25 / Period();

}

else

{

MaperiodM5maBIG_1 = 750;

MaperiodM5maBIG_2 = 750;

MaperiodM5ma_1 = 25;

MaperiodM5ma_2 = 25;

}

M5maBIG_1= iMA(ed,Period(),MaperiodM5maBIG_1,0,MODE_EMA,PRICE_CLOSE,1);

M5maBIG_2= iMA(ed,Period(),MaperiodM5maBIG_2,0,MODE_EMA,PRICE_CLOSE,2);

M5ma_1= iMA(ed,Period(),MaperiodM5ma_1,0,MODE_EMA,PRICE_CLOSE,1);

M5ma_2= iMA(ed,Period(),MaperiodM5ma_2,0,MODE_EMA,PRICE_CLOSE,2);

if(M5ma_2>M5maBIG_2&&M5ma_1<M5maBIG_1){ordersend(520);......................................................... I think we should also fiddle with brackets like-------((M5ma_2>M5maBIG_2)&&(M5ma_1<M5maBIG_1))---

or (((M5ma_2)>M5maBIG_2)&&((M5ma_1)<M5maBIG_1))

}//amx13_75

if(a==520){RefreshRates();//__________________________________________________________________________________

op=NormalizeDouble(Ask,Digits);sl=NormalizeDouble(op-62*kio*Point,Digits);tp=NormalizeDouble(op+54*kio*Point,Digits);

ticket=OrderSend(ed,OP_BUY, Lot,op,3,sl,0,comm,magic+520,0,Green);//_____Lot=

err=GetLastError();

if(err!=0){Print("Error-",err," op-",op," sl-",sl," tp-",tp);}}

that doesn't work either, by the way......... :(

 
Vinin:

In addition to the period, there is also the type. Not every swing can be quite accurate on other timeframes. On smaller ones you can, on higher ones not so much

Yeah, I'm aware of that, but in this case porting the waving period by multiplying/splitting to the correct TF should give more accurate results. As far as I remember the results are always worse when using a wand from a different timeframe, but I don't claim the truth.
 
benzovoz:

Yes, I'm aware of that, but in this case porting the waving period by multiplying/splitting to the correct TF should give more accurate results. As far as I remember when using the waving obviously from another TF the results are always worse, but I am not claiming the truth.

so how do you get the same results on different timeframes? :/
 

Here to try and add:

if(Period()>1){

MaperiodM5maBIG_1 = 750 / Period();

MaperiodM5maBIG_2 = 750 / Period();

MaperiodM5ma_1 = 25 / Period();

MaperiodM5ma_2 = 25 / Period();

}

else

{

MaperiodM5maBIG_1 = 750;

MaperiodM5maBIG_2 = 750;

MaperiodM5ma_1 = 25;

MaperiodM5ma_2 = 25;

}

if( MaperiodM5ma_1 <1) MaperiodM5ma_1 = 1; 

if( MaperiodM5ma_2 <1) MaperiodM5ma_2 = 1;   


 
laveosa:

so how do you get the same result at different timings? :/

You can't get the same, but you can get close
 
benzovoz:

Here to try and add:

if(Period()>1){

MaperiodM5maBIG_1 = 750 / Period();

MaperiodM5maBIG_2 = 750 / Period();

MaperiodM5ma_1 = 25 / Period();

MaperiodM5ma_2 = 25 / Period();

}

else

{

MaperiodM5maBIG_1 = 750;

MaperiodM5maBIG_2 = 750;

MaperiodM5ma_1 = 25;

MaperiodM5ma_2 = 25;

}

if( MaperiodM5ma_1 <1) MaperiodM5ma_1 = 1; 

if( MaperiodM5ma_2 <1) MaperiodM5ma_2 = 1;   



noaaaaa not working..... what were we doing that for?
 
Vinin:

You can't get the same one, but you can get a close one

in other words gentlemen..... if you write an owl then only one timing and not a mix of different ones right? :)
 
laveosa:

in other words gentlemen..... if you write an owl then only one timing and not a mix of different ones right? :)

You just have to think before you ask questions. Close and not close are completely different concepts.
 
laveosa:

no it's not working..... what did we do it for?


MaperiodM5ma_2 = 25 / Period(); Suppose we set it on H1, as the result we get 25/60=0.41, in int it will be 0, as there is no such МА period, in this case we use the minimal possible one, i.e. 1. Actually it should work, I sometimes use such variants, the result of trade insignificantly differs from the "native" period.