final line syntax error??

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #140421 quote
    PleidianPleidian
    Participant
    Average
    a3=ExponentialAverage[8](close)
    a4=ExponentialAverage[10](close)
    a5=ExponentialAverage[12](close)
    a6=ExponentialAverage[15](close)
    a7=ExponentialAverage[30](close)
    a8=ExponentialAverage[35](close)
    a9=ExponentialAverage[40](close)
    a10=ExponentialAverage[45](close)
    a11=ExponentialAverage[50](close)
    a12=ExponentialAverage[60](close)
    a3 = low*1.00
    a4 = high*1.00
    
    if a2 < a1 then
    if a3 < a2 then
    if a4 < a3 then
    if a5 < a4 then
    if a6 < a5 then
    if a7 < a6 then
    if a8 < a7 then
    if a9 < a8 then
    if a10 < a9 then
    if a11 < a10 then
    if a12 < a11 then
    
    DRAWTEXT("BUY", barindex, a4, SansSerif, standard,15)coloured(0,255,0)
    endif
    
    if a2 > a1 then
    if a3 > a2 then
    if a4 > a3 then
    if a5 > a4 then
    if a6 > a5 then
    if a7 > a6 then
    if a8 > a7 then
    if a9 > a8 then
    if a10 > a9 then
    if a11 > a10 then
    if a12 > a11 then
    
    DRAWTEXT("SELL", barindex, a3, SansSerif, standard,15)coloured(255,0,0)
    endif

    Hi Nicholas, how do i end this code.?  I put “return” at the end but it shows up as syntax error on the last line…

    cheers

    Pleidian

    #140426 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Anytime you use IF…. there must be a closing ENDIF.

    #140427 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    At line 27 you only wrote ENDIF once, while you should use as many as  the number of IF’s.

    The same at line 42.

    Then add RETURN.

    #140435 quote
    PleidianPleidian
    Participant
    Average

    cheers friends appreciate your help!

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

final line syntax error??


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Pleidian @pleidian Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by PleidianPleidian
6 years, 2 months ago.

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