no buy or sell for at least 30 minutes

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

    Hello. is there a code that means it cannot make a new buy long or short  after at least 30 minutes from the last sale?

    #224540 quote
    JSJS
    Participant
    Master

    Hi,

    Try this one…

     

    TimeFrame(1 minute)
    
    If OnMarket[1] and NOT OnMarket then
    xStartBar=BarIndex
    EndIf
    
    If NOT OnMarket and (BarIndex-xStartBar)>=30 then
    TradeOn=1
    Else
    TradeOn=0
    EndIf
    #224541 quote
    kvacksa87kvacksa87
    Participant
    Junior

    Thank you for fast Replay. I will try when i come home from work 🙂

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

no buy or sell for at least 30 minutes


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
kvacksa87 @kvacksa87 Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by kvacksa87kvacksa87
2 years, 10 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 11/29/2023
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...