buy and sell conditions

Forums ProRealTime English forum ProOrder support buy and sell conditions

Viewing 8 posts - 1 through 8 (of 8 total)
  • #224669

    Hi,

    how can i build the buy and sell conditions for this indicator: https://www.prorealcode.com/prorealtime-indicators/pivot-point-supertrend/

    I need help for this szenario:  3 contracts with different TP’s, first after 100 Point, second after 200 Points, third one if the trend changes

    How it is possible to draw the trailingsl in the cahrt if the strategy is running?

    Thanks in adcance

    #224698

    It doesnt work, how can help?

     

    IF NOT LongOnMarket AND close > trailingsl THEN
    BUY 3 CONTRACTS AT MARKET
    SET TARGET PROFIT 1 = TPL1
    SET TARGET PROFIT 2 = TPL2
    ENDIF
    // Bedingungen zum Ausstieg von Long-Positionen
    if longonmarket and close – tradeprice(1) >= TPL1 AND abs(CountOfPosition) = 3 then
    SELL 1 CONTRACT AT MARKET
    endif
    if longonmarket and close – tradeprice(1) >= TPL2 AND abs(CountOfPosition) = 2 then
    SELL 1 CONTRACT AT MARKET
    endif
    If LongOnMarket AND close CROSSES UNDER trailingsl THEN
    SELL AT MARKET
    ENDIF

    // Bedingungen zum Einstieg in Short-Positionen
    IF NOT ShortOnMarket AND close < trailingsl THEN
    SELLSHORT 3 CONTRACTS AT MARKET
    SET TARGET PROFIT 1 = TPS1
    SET TARGET PROFIT 2 = TPS2
    ENDIF

    // Bedingungen zum Ausstieg aus Short-Positionen
    if ShortOnMarket and tradeprice(1) – close >= TPS1 AND abs(CountOfPosition) = 3 then
    EXITSHORT 1 CONTRACT AT MARKET
    endif
    if ShortOnMarket and tradeprice(1) – close >= TPS2 AND abs(CountOfPosition) = 2 then
    EXITSHORT 1 CONTRACT AT MARKET
    endif
    IF ShortOnMarket AND close CROSSES OVER trailingsl THEN
    EXITSHORT AT MARKET
    ENDIF

    #224713

    You first need to CALL it from your strategy (I used the same names for variables, as they are shown with RETURN in the indicator):

    then you will have to use those data as you wish to enter trades, like any other condition.

     

     

     

    1 user thanked author for this post.
    #225081

    Hi,

    dont know whats wrong, but PRT dont know the Stop Loss Order anymore?

     

     

    1 user thanked author for this post.
    #225083

    Yeah, the 6 Dec V12 upgrade isn’t one of the best in PRT’s history.
    No Detailed Report data as well , only a few things work. They are working on this one already.

    2 users thanked author for this post.
    #225141

    So I waited till today (Tuesday) and contacted local (Dutch) support about both issues, with the Set Stop Loss the most prominent of course and they heard …
    Nothing.

    This tells me how many people use PRT-IB and autotrading under V12. A virtual zero (maybe I count for 1, but I did not call either).

    The Detailed Report issue I reported by means of Technical Report on Saturday. Meanwhile for other (memory) issues, I was advised this morning to retry something “because there’s a new version now” (which is the one from Dec. 6).
    Sure.

    I really don’t know what they are doing in Paris. Fact is : if nobody reports the errors (I deem these more than just bugs), they probably “can’t know”.

    #225148

    Small correction :

    It is the Syntax Highlighting which is messy in this case. See below;
    When the command is typed fully, it is just accepted. And @killerplatuze, when you can’t complete the command because of a syntax error (the = does not belong), it keeps on telling you that the “Stop” part is rejected.

    Maybe I still don’t know what they are doing in Paris, but it sure are good things as well. 🙂
    The syntax highlighting issue was passed on to ProRealTime, but is no big deal anyway, once you know how to deal with it.

    Not to justify my own mistake, but I am not using PRT’s editor, so I never saw what’s going on with the syntax highlighting.

    #225219

    I suggest to code line 6 as:

    as in your case, say you work with DAX, that would be over a 16K-pip Stop Loss!  (LOSS requires a price distance, PLOSS a pip difference, $LOSS a currency difference and %LOSS a percentage difference).

     

    2 users thanked author for this post.
Viewing 8 posts - 1 through 8 (of 8 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login