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

 
100yan:

Thank you!
But it's not working - it's a simple shift... and I need to know the MA value 56 bars back! Anybody have any tips? Thanks in advance!
 
ma_shift is the shift, shift is the bar at which the MA is calculated
 
eddy:

double iMA( symbol, timeframe, period, ma_shift, ma_method, applied_price, shift)
Parameters:
ma_shift
- shift - shift of indicator relative to the price chart.
shift- index of the value obtained from the indicator buffer (shift relative to the current bar by the specified number of periods back).

I've read it too... I may have understood it wrong, but in practice I tried it in different ways... It does not work! For example, with Alligator: If you change both its shift and ma_shift in the indicator, the result is the same - it shifts on the chart... Why?
 
IgorM:
everything is correct, only there is no control that an order has already been placed, i.e. you will now have a new order every tick

How do you set this control?
 
100yan:
I've read that too... maybe I've got it wrong, but in practice I've tried different ways... It doesn't work! For example, with Alligator: If you change both shift and ma_shift in the indicator, the result will be the same - the chart will shift... Why?

There is no shift if ma_shift=0, it must be because there are no values after shift, i.e. because the line ends.

 
Can you tell me how to move or copy objects ( vertical lines in my case) from one window to another?
 
AndrejFX:
Can you tell me how to move or copy objects (vertical lines in my case) from one window to another?

there is an object synchronizer in the codebase

But if only vertical lines, this one is better.

 
sergeev:

the codebase has an object synchronizer

but if only vertical ones, this one is better

nice script, thank you!
 

eddy:

why does my MainBuffer[i] exceed 100? where is the error?

I found where the error is, but I don't understand why.

HighesBuffer[i]=MathMax(HighesBuffer[i],High[k]); //if(High[k]>maximum) maximum=High[k];
 LowesBuffer[i]=MathMin(LowesBuffer[i],Low[k]);   // if(Low[k]<minimum) minimum=Low[k];

it's not the same as.

if(High[k]>HighesBuffer[i]) HighesBuffer[i]=High[k];
if(Low[k]<LowesBuffer[i]) LowesBuffer[i]=Low[k];
 


Guys help, I don't get it....
Entry to buy: When two RSI indicators with periods of 14 and 17 cross simultaneously and close above 30 upwards....

Entry to sell: When two RSI indicators with periods of 14 and 17 cross simultaneously and close below the level of 70 from above down....

What I am interested in is a simultaneous cross of the blood... i.e. EXAMPLE

diRSI1 and diRSI2 were both below 30, and on the close of the next candle both were above 30... Similarly with level 70!


double diRSI1=iRSI(NULL,0,14,PRICE_CLOSE,0);
double diRSI2=iRSI(NULL,0,17,PRICE_CLOSE,0);
double diRSI3=iRSI(NULL,0,14,PRICE_CLOSE,1);
double diRSI4=iRSI(NULL,0,17,PRICE_CLOSE,1);

if(AccountFreeMargin()<(100*Lots)){
Print("We have no money. Free Margin = ", AccountFreeMargin());
return(0);
}
if (!ExistPositions()){

if (( diRSI1>30 && diRSI2>30 && diRSI3<30 && diRSI4<30)){
OpenBuy();
return(0);
}

if ((diRSI1<70 && diRSI2<70 && diRSI3>70 && diRSI4>70)){
OpenSell();
return(0);
}
}


if correct then on test still opens trades that don't fit....

HELP...