Not logged in
Viewing 3 posts - 1 through 3 (of 3 total)
  • #112650 |
    Customer
    484 Posts

    I want to shift the signal arrow to the previous candles. See below. This is a signal indicator, not EA.

     

    Attachments in this forum are visible only for registered users.

    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.

     

    #126545
    Mark Fric
    Administrator
    1182 Posts

    Hello,

     

    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

    Mark
    StrategyQuant architect

    #126561
    Customer
    484 Posts

    Awesome, thanks man. Your  software and EAs teaching me a lot about mql4

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.