no buy or sell for at least 30 minutes

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #224539 quote
    kvacksa87
    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
    JS
    Participant
    Senior

    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
    kvacksa87
    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.

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 kvacksa87
2 years, 2 months ago.

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