Why do we think so complicated? Opening strategies

Viewing 2 posts - 16 through 17 (of 17 total)
  • Author
    Posts
  • #174845 quote
    XORANDNOT
    Participant
    Senior

    A short code for slippage correction :

    c100 = barindex = tradeindex
    spread = 1.2
    
    If longonmarket and c100 then
    priceinlong = open + spread / 2
    set stop ploss sl + (positionprice - priceinlong)
    set target pprofit tp - (positionprice - priceinlong)
    endif
    
    If shortonmarket and c100 then
    priceinshort = open – spread / 2
    set stop ploss sl + (priceinshort - positionprice)
    set target pprofit tp - (priceinshort - positionprice) 
    endif
    #174847 quote
    phoentzs
    Participant
    Master

    Thanks, I’ll give it a try.

Viewing 2 posts - 16 through 17 (of 17 total)
  • You must be logged in to reply to this topic.

Why do we think so complicated? Opening strategies


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
phoentzs @phoentzs Participant
Summary

This topic contains 16 replies,
has 4 voices, and was last updated by phoentzs
4 years, 6 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 08/05/2021
Status: Active
Attachments: 5 files
Logo Logo
Loading...