Target profit doesn't work

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #77836 quote
    IcoopsIcoops
    Participant
    New

    Hi together, I use the target profit often but this time it doesn’t work and i can’t understand why.. Perhaps somebody can check if this code seems to be okay?

    #77837 quote
    IcoopsIcoops
    Participant
    New
    period = 15
    LMA=2*weightedaverage[period](close)-average[period](close)
    once support=low
    once resistance=high
    smoothLMA=weightedaverage[period](LMA)
    IF LMA crosses over smoothLMA THEN
       support=lowest[period](low)
    ENDIF
    IF LMA crosses under smoothLMA THEN
       resistance=highest[period](high)
    ENDIF
    support=min(low,support)
    resistance=max(high,resistance)
    IF NOT LongOnMarket AND CLOSE > resistance[15] THEN
       BUY 1 CONTRACTS AT MARKET
    ENDIF
    IF NOT ShortOnMarket AND CLOSE < support[15] THEN
       SELLSHORT 1 CONTRACTS AT MARKET
    ENDIF
    SET TARGET PROFIT 10
    SET STOP LOSS 30

     

    #77838 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    On which instrument and TF are you running it?

     

    #77840 quote
    IcoopsIcoops
    Participant
    New
    I’m using it on USD/EUR
    #77844 quote
    NicolasNicolas
    Keymaster
    Legend

    TARGET PROFIT 10 means that you want your profit to be set at your openprice + 10, while it should be at openprice + 0.0010  (10 pips).

    The perfect solution would be to use PPROFIT and not PROFIT, because PPROFIT automatically convert the desired points with the point size of the current instrument. 

Viewing 5 posts - 1 through 5 (of 5 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

Target profit doesn't work


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Icoops @icoops Participant
Summary

This topic contains 4 replies,
has 3 voices, and was last updated by NicolasNicolas
8 years, 1 month ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 08/09/2018
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...