Need assistance coding a strategy

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #224094 quote
    BeakerBeaker
    Participant
    New

    Hey team,

     

    i cant seem to get the strategy builder to do what I want.

     

    I want it to execute the trade if the chart moves x points from the opening of a candle in either direction. the trade is to be executed in the same direction as the movement. for example, the 10 am candle opens at 4500 when it gets to 4502.5 i want to it buy or when it gets to 4497.5 i want it to sell.  Obviously, it will need to program SL and TP’s also.

    i understand it will need to be a tick-based strategy that executes before the candle closes but couldn’t figure out the basic of getting the Strat builder to execute after a time and price movement

    Any help would be greatly appreciated!!

    Beaker

    #225521 quote
    Jean FXJean FX
    Moderator
    Junior

    The problem is that to place an order on the 10am opening price, you have to wait for this candlestick to close.
    Your code is therefore based on the candlestick closing just before 10:00, not the one that opens at 10:00, but it is indeed the simplest.

    On the other hand, you’ve reversed the level required for buying and selling + not the notion of a point, which I think is more appropriate:

    c1 = time =100000
    
    IF c1 THEN
    BUY 1 SHARES AT close + 2.5*pointsize stop
    ENDIF
    
    // Conditions pour ouvrir une position en vente à découvert
    IF c1 THEN
    SELLSHORT 1 SHARES AT close - 2.5*pointsize stop
    ENDIF
    
    SET STOP PLOSS 10
    SET TARGET PPROFIT 10
Viewing 2 posts - 1 through 2 (of 2 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

Need assistance coding a strategy


General Trading: Market Analysis & Manual Trading

New Reply
Author
author-avatar
Beaker @beaker Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Jean FXJean FX
2 years, 9 months ago.

Topic Details
Forum: General Trading: Market Analysis & Manual Trading
Language: English
Started: 11/21/2023
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...