Announcement

Collapse
No announcement yet.

drawShapeRelative

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • drawShapeRelative

    I am trying to get signals plotted on the enclosed code.
    Obviously I have a mistake in the code but can not figure out how to fix it.
    The drawShapeRelative dots do not plot.

    Can somebody please point out my error.

    It would be appreciated.

    Regards
    Attached Files

  • #2
    Kobus
    The conditions and statements in lines 290-300 need to be placed before the return new Array(...) statement and not after.
    Alex

    Comment


    • #3
      Alex

      Thank you very much, as always you make light work of any problem.

      I got a little more bold and entered a stop strategy. However the trades do not close when I intend them to close. If you load the attached EFS onto a 60 min GBPUSD chart you will see that price break occasionally the stop line but do not close the trade.

      There are 2 lines plotted on the chart. When price close above the top line then go long, if price break bottom line then close trade.

      When price close below bottom line go short, when price breaks top line close trade.

      Do you mind advising me how I can adjust the code to achief this? I would realy appreciate your help.

      Regards
      Attached Files

      Comment


      • #4
        Kobus
        The best way to verify how the stops are working is to actually plot them.
        Add nStop to your return statement and you will see why the trades are not closed when the upper or lower bands are breached.
        Alex

        Comment

        Working...
        X