Target profit doesn't work

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #77836 quote
    Icoops
    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
    Icoops
    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
    robertogozzi
    Moderator
    Master

    On which instrument and TF are you running it?

     

    #77840 quote
    Icoops
    Participant
    New
    I’m using it on USD/EUR
    #77844 quote
    Nicolas
    Keymaster
    Master

    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.

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 Nicolas
7 years, 6 months ago.

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