Spot on SMA-level not next bar open

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #164511 quote
    LASSETASSELASSETASSE
    Participant
    Junior

    I wish to trade when price touches sma as same value as sma , not next bar open.
    Ex. 30min timframe and if price is spot on (sma 20) LIVE, i want it to bye or sell
    Is this possible?

    #164520 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    You cannot if you only use the 30-minute TF.

    It’s possible if you use Multi Time Frame support. It will allow you to use also a lower TF, down to even 1 second, so you can detect that occurrence as soon as it happens.

    Searching the forum for MTF or Multi Time Frame, will return you videos, articles and examples about it.

    LASSETASSE thanked this post
    #164565 quote
    NicolasNicolas
    Keymaster
    Legend

    You can also put pending orders on the SMA price levels: (LIMIT if you are above, or STOP if you are below).

    sma = average[20]
    
    if close > sma then 
     buy at sma limit 
    elsif close < sma then 
     buy at sma stop 
    endif
    LASSETASSE and Khaled thanked this post
Viewing 3 posts - 1 through 3 (of 3 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

Spot on SMA-level not next bar open


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
LASSETASSE @lassetasse Participant
Summary

This topic contains 2 replies,
has 3 voices, and was last updated by NicolasNicolas
5 years, 6 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 03/17/2021
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...