forex software

Create and Test Forex Strategies

forex software

Skip to forum content

Forex Software

Create and Test Forex Strategies

You are not logged in. Please login or register.


Forex Software → Technical Indicators → New Pivot Point Indicator

Pages 1

You must login or register to post a reply

RSS topic feed

Posts: 1

1 (edited by mixmanmatt 2011-12-16 04:47:10)

Topic: New Pivot Point Indicator

My pivot point indicator finds:

If R1 and Previous Day High are the same by +/- %5 of the R1 - S1 range (Resistance 1 - Support 1)
Then a long order is placed 2 pips above whichever level is higher (R1 or Last Days High)

The opposite goes for a short position


The target is 70% of range R1 - S1 and stoploss is %40 of the R1-S1 range.

I have had alittle bit of success with this but want to back test it
Im not sure if its possible however to program in individual TP and SLosses for each trade

So I was hoping someone could help me with this I have only programed this in Visual Basic 6

I find that when using this indicator when a long order is placed there is almost always a short order placed at the same time.  SO ambigous bars are expected

Here is what the code looks like as an app for Visual Basic:

        'Calculate Pivot Points
        pivot.Text = (Val(highbox.Text) + Val(lowbox.Text) + Val(closebox.Text)) / 3
        rone.Text = 2 * Val(pivot.Text) - Val(lowbox.Text)
        sone.Text = 2 * Val(pivot.Text) - Val(highbox.Text)
        rtwo.Text = Val(pivot.Text) + (Val(rone.Text) - Val(sone.Text))
        stwo.Text = Val(pivot.Text) - (Val(rone.Text) - Val(sone.Text))


        'Check For Buy Signal
        If Val(highbox.Text) > (Val(rone.Text) - ((Val(rone.Text) - Val(sone.Text)) * 0.1)) And Val(highbox.Text) < (Val(rone.Text) + ((Val(rone.Text) - Val(sone.Text)) * 0.1)) Or Val(rone.Text) = Val(highbox.Text) Then
            'Buy Signal good then
            If Val(highbox.Text) > Val(rone.Text) Or Val(highbox.Text) = Val(rone.Text) Then
                buyat.Text = Val(highbox.Text) + ((Val(rone.Text) - Val(sone.Text)) * 0.05)
            End If
            If Val(highbox.Text) < Val(rone.Text) Then
                buyat.Text = Val(rone.Text) + ((Val(rone.Text) - Val(sone.Text)) * 0.05)
            End If
            exitbuy.Text = Val(buyat.Text) - ((Val(rone.Text) - Val(sone.Text)) * 0.4)
            targetbuy.Text = Val(buyat.Text) + ((Val(rone.Text) - Val(sone.Text)) * 0.7)
        Else
            buyat.Text = "No Buy"
            exitbuy.Text = "0"
            targetbuy.Text = "0"
        End If


        'Check For Sell Signal
        If Val(lowbox.Text) > (Val(sone.Text) - ((Val(rone.Text) - Val(sone.Text)) * 0.1)) And Val(lowbox.Text) < (Val(sone.Text) + ((Val(rone.Text) - Val(sone.Text)) * 0.1)) Or Val(sone.Text) = Val(lowbox.Text) Then
            'Sell Signal good then
            If Val(lowbox.Text) > Val(sone.Text) Or Val(lowbox.Text) = Val(sone.Text) Then
                sellat.Text = Val(sone.Text) - ((Val(rone.Text) - Val(sone.Text)) * 0.05)
            End If
            If Val(lowbox.Text) < Val(sone.Text) Then
                sellat.Text = Val(lowbox.Text) - ((Val(rone.Text) - Val(sone.Text)) * 0.05)
            End If
            exitsell.Text = Val(sellat.Text) + ((Val(rone.Text) - Val(sone.Text)) * 0.4)
            targetsell.Text = Val(sellat.Text) - ((Val(rone.Text) - Val(sone.Text)) * 0.7)
        Else
            sellat.Text = "No Sell"
            exitsell.Text = "0"
            targetsell.Text = "0"
        End If

        'Display BUY and SELL signal Targets and Stop Losses in Pips
        pipsbuyexit.Text = Val(buyat.Text) - Val(exitbuy.Text)
        pipsbuytarget.Text = Val(targetbuy.Text) - Val(buyat.Text)

        pipssellexit.Text = Val(exitsell.Text) - Val(sellat.Text)
        pipsselltarget.Text = Val(sellat.Text) - Val(targetsell.Text)

Posts: 1

Pages 1

You must login or register to post a reply

Forex Software → Technical Indicators → New Pivot Point Indicator

Similar topics in this forum