EA Indicator: Signal shift
2件の返信
I want to shift the signal arrow to the previous candles. See below. This is a signal indicator, not EA.
Is there somewhere in this code I can shift the arrow?
double getDrawOffset(int signalIndex, int i) {
if(signalIndex == 1) {
if(Signal1Pos == "High") {
return(High[i]+atrOffset + (sigCountOffsets(signalIndex, "High"))*(atrOffset*0.1));
} else {
return(Low[i]-atrOffset - (sigCountOffsets(signalIndex, "Low"))*(atrOffset*0.1));
}
}
if(signalIndex == 2) {
if(Signal2Pos == "High") {
return(High[i]+atrOffset + (sigCountOffsets(signalIndex, "High"))*(atrOffset*0.1));
} else {
return(Low[i]-atrOffset - (sigCountOffsets(signalIndex, "Low"))*(atrOffset*0.1));
}
}
return(false);
}
Possibly add an extern shift.
0
こんにちは,
you should be able to achieve this by a small change in the code. Find a function drawSignal and add one line in the beginning:
void drawSignal(int signalIndex, int i, double value) {
i = i-1;
… rest of the code unchanged
マーク
StrategyQuantアーキテクト
0
Awesome, thanks man. Your software and EAs teaching me a lot about mql4
0
2件の返信を表示中 - 1 - 2件目 (全2件中)