Reversal System written in exact VBA code

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #196573 quote
    oyinloyeaoyinloyea
    Participant
    Veteran
    Kindly change to Prorealcode. Thanks in advance #System #PARAM “Wick_Multiplier”, 2.5, .5, 20 #PARAM “Body_Percentage”, .25, .1, 1 If C > O _ AND (O – L) >= ((C – O) * Wick_Multiplier) _ AND (H – C) <= ((H – L) * Body_Percentage) _ OR C < O _ AND (C – L) >= ((O – C) * Wick_Multiplier) _ AND (H – C) <= ((H – L) * Body_Percentage) _ OR C = O AND NOT C = H _ AND (H – L) >= ((H – C) * Wick_Multiplier) _ AND (H – C) <= ((H – L) * Body_Percentage) _ OR O = H AND C = H _ AND H – L >= AVG(H-L, 50) Then Signal = LongSignal ElseIf C < O _ AND (H – O) >= ((O – C) * Wick_Multiplier) _ AND (C – L) <= ((H – L) * Body_Percentage) _ OR C > O _ AND (H – C) >= ((C – O) * Wick_Multiplier) _ AND (C – L) <= ((H – L) * Body_Percentage) _ OR C = O AND NOT C = L _ AND (H – L) >= ((C – L) * Wick_Multiplier) _ AND (C – L) <= ((H – L) * Body_Percentage) _ OR O = L AND C = L _ AND H – L >= AVG(H-L, 50) Then Signal = ShortSignal End If
    #196593 quote
    JSJS
    Participant
    Master
    WickMultiplier = 2.5 // min 0.5, max 20
    BodyPercentage = .25 // min 0.1, max 1
    
    TopBody = max(close, open)
    
    BottomBody = min(close, open)
    
    BodySize = TopBody - BottomBody
    
    TopWickSize = high - TopBody
    
    BottomWickSize = BottomBody - low
    
    WickRange = Average[50](high - low)
    
    BullSignal = (BottomWickSize > (WickMultiplier*BodySize)) and (close > (low + (WickRange*(1-BodyPercentage))))
    
    BearSignal = (TopWickSize > (WickMultiplier*BodySize)) and (close < (low + (WickRange*BodyPercentage)))
    
    Return BullSignal as "BullSignal" Coloured(0,255,0) , BearSignal as "BearSignal" Coloured(255,0,0)
    

    Hi @oyinloyea

    I converted the code into a slightly more understandable version.

    oyinloyea thanked this post
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI Novità

Bloccato su questo codice ProBuilder?

Descrivi in linguaggio naturale ciò che questo argomento vuole costruire e ProRealAI scriverà per te l'indicatore, lo screener o il sistema ProRealTime™.

Disponibile in 7 lingue
Prova ProRealAI

Reversal System written in exact VBA code


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
oyinloyea @oyinloyea Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by JSJS
4 years, 4 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 07/01/2022
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...