Why do we think so complicated? Opening strategies

Viewing 2 posts - 16 through 17 (of 17 total)
  • Author
    Posts
  • #174845 quote
    XORANDNOTXORANDNOT
    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
    phoentzsphoentzs
    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.
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

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 phoentzsphoentzs
5 years, 1 month ago.

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