Not logged in
Viewing 6 posts - 1 through 6 (of 6 total)

Forums>AlgoWizard / EA Wizard>Application Support>creating simply pivot indicator

  • #112146 |
    Participant
    5 Posts

    Hi fellow programmers and traders,

     

    I am struggled trough the signal indicator wich I would create: it’s a very simple pivot indicator wich gives a high signal when any candle has two lower lows either side of it and two lower highs either sides of it.

    A low signal opposite, any candle that has two higher highs and two higher lows either side of it.

    I attached a picture of it. Unfortunatelly the indy what I created does not follow that rules (also attached a picture).

    Anybody has an idea where I made the mistake?

    Second question, that I found a topic here in the forum how to move signal arrows closer to price bar, but still challenging me how to do it. Possible to show me with example?Maybe with this pivot indicator?

    Thanks in advance.

     

    Csaba

     

    Attachments in this forum are visible only for registered users.
    Attachments in this forum are visible only for registered users.
    Attachments in this forum are visible only for registered users.
    #124570
    Participant
    5 Posts

    Hello,

     

    Any help for this signal indicator? Several times I get the correct signal, but after I get an indication incorrectly.

    And please, any help to move signal arrows closer to bar?

    When I use rules in custom functions: “void sqDrawUpArrow(int shift”) and “void sqDrawDownArrow(int shift)” I get errors in mt 4editor.

    Thanks your help.

    #124592
    Mark Fric
    Administrator
    1182 Posts

    Hello,

     

    I checked this.

     

     

     

    any help to move signal arrows closer to bar?

     

     

     

    yes, in the EA find row with:

    atrOffset = 0.5 * iATR(NULL, 0, 10, 1);

     

    and change 0.5 to 0.1

     

     

    Secondly, I think your rules are too difficult, but they might work too. I’m attaching sqw with simpler rules.

     

    Thirdly, indicator doesn’t use actions from THEN part, so you cannot tell it to draw arrows 2 bar back.

    The solution is to edit the EA again, find the function drawSignal() and add +1 after the i:

     

    void drawSignal(int signalIndex, int i, double value) {
       if(signalIndex == 1) {
          Signal1Buffer[i+1] = value;
       }
       if(signalIndex == 2) {
          Signal2Buffer[i+1] = value;
       }
    }
     
    This moves the signal points one bar back, then it should work as you expect.
    Attachments in this forum are visible only for registered users.

    Mark
    StrategyQuant architect

    #124603
    Participant
    5 Posts

    Mark,

     

    Thanks for answer and your help. I made the changes what you adviced, but unfortunatelly the signal indicator still does not follow the rules.(Pls see attachement)

     

    Regards,

    Csaba

    Attachments in this forum are visible only for registered users.
    #124615
    Mark Fric
    Administrator
    1182 Posts

    Hello,

     

    I tested the indicator and it seems to me it is working correctly.Can you show me the error on a screenshot?

    Mark
    StrategyQuant architect

    #124625
    Participant
    5 Posts

    Mark,

     

    Please see in attachment. I marked in blue arrow the pivot highs/pivot lows. I also noticed, that is not possible to move indication dots/arrows even closer to the bar? I mean exactly end of the candle high/low?

     

    Many thanks for your help,

     

    Csaba

    Attachments in this forum are visible only for registered users.
Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.