Calling conditions from indicator

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #160312 quote
    umebon
    Participant
    Average

    I need some help and it is probably something easy too fix. I am coding an indicator that I want too call in a system and I cant get it too work. Now I have simplified it so that I can understand how it works before I build the the  indicator.

    The indicator is named DAXMF_indicator

    c1 = close crosses over average[200]
    return c1 AS "c1"

    And my system file looks like this:

    CALL "DAXMF_indicator"
    IF c1 THEN
    BUY 1 Contract AT Market
    ENDIF
    SET TARGET pPROFIT 100
    SET STOP   pLOSS   50

    When I backtest the system I get a message that c1 is “undefined”, can someone please help me.

    #160313 quote
    umebon
    Participant
    Average

    Ahhh.. I think I just worked it out..

    #160324 quote
    Nicolas
    Keymaster
    Master

    You have to give the value of the CALL to a variable:

    c1 = CALL "DAXMF_indicator"
    umebon thanked this post
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Calling conditions from indicator


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
umebon @umebon Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Nicolas
5 years, 2 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 02/04/2021
Status: Active
Attachments: No files
Logo Logo
Loading...