Spot on SMA-level not next bar open

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #164511 quote
    LASSETASSE
    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
    robertogozzi
    Moderator
    Master

    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
    Nicolas
    Keymaster
    Master

    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.

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 Nicolas
4 years, 11 months ago.

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