only one trade per day on 3 strategies

Viewing 15 posts - 46 through 60 (of 60 total)
  • Author
    Posts
  • #17811 quote
    NicolasNicolas
    Keymaster
    Legend

    Your code seems right to me: each time the fast DEMA crosses over the slow DEMA, the system buy 5 contracts.

    #17812 quote
    dreif123dreif123
    Participant
    Average

    hi Nicolas ,
    but the systems does it only ONCE a time …

    #17815 quote
    NicolasNicolas
    Keymaster
    Legend

    Just update your code with my last example about the bollinger bands and you’re ok.

    #17816 quote
    dreif123dreif123
    Participant
    Average

    sorry don’t understand what you mean …just to make sure… I do not like to have just one execution on the day… so always if the lines cross over the system should buy ……

    #17818 quote
    dreif123dreif123
    Participant
    Average

    hi niciolas , I found the solution ón my own thx,

    #21555 quote
    dreif123dreif123
    Participant
    Average

    hi Nicolas
    hi everybody ,
    is there a chance via proreal to do an strategie on EMA (Exponential moving average 21,55) on German Dax for example
    I found DEMA which seems not to be t he same
    thx
    regards

    #21607 quote
    NicolasNicolas
    Keymaster
    Legend

    If you mean change your actual strategy of this post, with EMA instead, why do not make it yourself?

    #21610 quote
    dreif123dreif123
    Participant
    Average

    it s a generall question ….ema is not  available on proreal  ? … or am i wrong

    #21616 quote
    GraHalGraHal
    Participant
    Legend

    Hi Dreif

    Strangely, although EMA is not available to add to a Chart; EMA is available using Fx when coding an Algo … see attachment

    GraHal

    EMA.jpg EMA.jpg
    #21651 quote
    dreif123dreif123
    Participant
    Average

    nicolas , not helpful your post … an answer with  yes or no would be more helpful  ….

    #21657 quote
    NicolasNicolas
    Keymaster
    Legend

    @GraHam

    Just add a “Moving Average” from the indicator selection window and then change its calculation mode from there (5 or 6 possible options: from SMA to Hull MA, etc..)


    @dreif123

    If you need to code a strategy with EMA, this link will lead you to an exponential moving average instruction example.

    #21676 quote
    GraHalGraHal
    Participant
    Legend

    Haha @Nicolas … I have selected EMA (as you say) several times, but forgot … I need to slow my brain when helping others, but thanks for the reminder 🙂

    #22740 quote
    Andy11Andy11
    Participant
    New

    Hi

    I just wanted to say thanks. The ‘do only one trade a day’ has been something I’ve really struggled to code for ages and your suggestion (using lasttradedate and opendate) worked perfectly!

    Made my day!

    Andy

    Nicolas thanked this post
    #22744 quote
    GraHalGraHal
    Participant
    Legend

    Hi Andy

    Might you be able to share your code for ‘do only one trade a day’ please?  This would ‘close the loop’ and make this thread a useful future reference for the Community.

    Thank You
    GraHal

    #22764 quote
    Andy11Andy11
    Participant
    New

    Sure,

    //I have this line at the beginning of my code after the defparams

    Once LastTradeDate = 0

    //Then this line after MyBuyCondition is defined

    ConditionTradedToday = LastTradeDate <> OpenDate

    //Then

    IF MyBuyCondition AND ConditionTradedToday THEN

    Buy 1 LOT AT MARKET

    SET TARGET PROFIT 10

    SET STOP LOSS 10

    LastTradeDate = OpenDate

    ENDIF

    //Hope that helps, this works on a 5m chart on wall street index on IG

    GraHal thanked this post
Viewing 15 posts - 46 through 60 (of 60 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

only one trade per day on 3 strategies


Platform Support: Charts, Data & Broker Setup

New Reply
Author
author-avatar
dreif123 @dreif123 Participant
Summary

This topic contains 59 replies,
has 6 voices, and was last updated by Andy11Andy11
9 years, 9 months ago.

Topic Details
Forum: Platform Support: Charts, Data & Broker Setup
Language: English
Started: 11/04/2016
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...