help coding a Gap strategy

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #157878 quote
    Supergute
    Participant
    New

    Hi , was some years since i trade and programing, need som help if possible ,
    with a code for backtesting/auto trade .

    Thanx alot

    Longtrade…
    •Close over MA 100 (daily)
    •Open in between yesterdays lowest and Highest
    •Open UNDER yesterdays close
    •Entry 10.00 a clock
    •Stop (x value) point
    •Target (xvalue) point
    •Timeexit 17.00 a clock

    #165659 quote
    robertogozzi
    Moderator
    Master

    There you go:

    Timeframe(Daily,UpdateOnClose)
    Sma100 = average[100,0](close)
    Timeframe(default)
    l1 = close > Sma100
    l2 = (Dopen(0) >= Dlow(1)) AND (Dopen(0) <= Dhigh(1))
    l3 = Dopen(0) < Dclose(1)
    IF (Time = 100000) OR ((Time > 100000) AND (Time[1] < 100000)) then
       BUY 1 Contract AT Market
       SET Stop   pLoss   300
       SET Target pProfit 300
    ENDIF
    IF (Time = 170000) OR ((Time > 170000) AND (Time[1] < 170000)) AND LongOnMarket then
       SELL at Market
    ENDIF
    //graphonprice Dopen(0)  coloured(0,0,255,85)
    //graphonprice Dopen(1)  coloured(0,0,255,255)
    //graphonprice Dhigh(1)  coloured(0,255,0,200)
    //graphonprice Dlow(1)   coloured(255,0,0,255)
    //graphonprice Dclose(1) coloured(0,0,255,80)
    //graphonprice Sma100
    Supergute and Midlanddave thanked this post
    #165766 quote
    Supergute
    Participant
    New

    Thank you so much for your time to help me..

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

help coding a Gap strategy


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Supergute @supergute Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Supergute
4 years, 11 months ago.

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