Formular execution in traing StopLoss

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #197303 quote
    NacoNaco
    Participant
    New

    Hi,

    I have added the following code:

    weightedStop = WeightedAverage[14](AverageTrueRange[2](close))*2
    SET STOP PTRAILING weightedStop

    I am using 15minute timeframe. Now I was expecting to have “weightedStop” being calculated every 15minutes and for the next 15minutes the calculated value will be used as trailing stop loss. Instead the trailing stop loss is changing throught a 15 minute candle, therefor I guess that the formular is constantly recalculating the stop loss value, because I set a formular that is depending on weightedaverages, which is “changing” with every tick.
    Am I understanding this correctly?
    If so, how can I workaround this? I am thinking of something like “value(weightedStop)”, but I wasn’t able to find anything close in the documentation.

    Thank you,
    Nico

    #197317 quote
    robertogozzi
    Moderator
    Master

    If you are using multiple time frames, then it depends on which TIMEFRAME instruction you placed the two lines.

    If you are not using multiple time frames it should not change as strategies are only executed at the closing of the 15-minute candle.

    #197624 quote
    GraHal
    Participant
    Master

    Roberto, does not SET STOP PTRAILING (used in code above) execute / move at each 1 point move in price (i.e. not wait until close of bar) after – in the case above – weightedStop condition has been met? 

    Put another way, TS Start = price moves by >= weightedStop then TS follows price for each 1 point move in price.

    #197642 quote
    robertogozzi
    Moderator
    Master

    Yes, you are right GraHal, it’s the TS start that moves each bar, while the step is always set to 1.

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

Formular execution in traing StopLoss


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
NacoNaco @naconaco Participant
Summary

This topic contains 3 replies,
has 3 voices, and was last updated by robertogozzi
3 years, 7 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 07/15/2022
Status: Active
Attachments: No files
Logo Logo
Loading...