Calculate 2 different EMA lengths

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #13629 quote
    jbyrne
    Participant
    Average

    Hello forum users! I need a screener to keep track of 1 minute EMAs (which ive already coded) but I would like it to also keep track of 5 minute EMAs at the same time. How can I get about doing this?

    Thanks

    Jem

    #13640 quote
    Nicolas
    Keymaster
    Master

    You can use multi time frame in ProScreener , you can find an example here in the documentation : www.prorealcode.com/documentation/timeframe

    jbyrne thanked this post
    #13664 quote
    jbyrne
    Participant
    Average

    Thank you so much! sorry for the long reply, have a nice weekend!

    #13670 quote
    jbyrne
    Participant
    Average

    Hello, After experimenting withe the code it seems that you can’t go any lower than 1 hour? I try using TIMEFRAME(5Minutes) and i get an error message suggesting that i replace ‘minutes’ with ‘hour’.

    And also, I want to track 1 minute data and 5 minute data, the screener is set to 1 minut so do I need to code in a TIMEFRAME(1minute) aswell as TIMEFRAME(5Minutes)?

    #13672 quote
    Nicolas
    Keymaster
    Master

    Better post it here your code to help you efficiently.

    jbyrne thanked this post
    #13673 quote
    jbyrne
    Participant
    Average

    heres the code, i want to be able to track the same ema crosses for 1 minute and 5 minute

    Timeframe(5minutes)
    Cross3 = (Ema20 crosses over ema50) or (ema20 crosses over ema100) or (ema50 crosses over ema100) or (ema50 crosses over ema200)

    Cross4 = (Ema20 crosses under ema50) or (ema20 crosses under ema100) or (ema50 crosses under ema100) or (ema50 crosses under ema200)
    Long1 = EMA20 < Ema200
    Long2 = EMA20 < Ema100
    Long3 = EMA50 < Ema200
    Long4 = EMA50 < Ema100

    Short1 = EMA20 > Ema200
    Short2 = EMA20 > Ema100
    Short3 = Ema50 > Ema200
    Short4 = Ema50 > Ema100

    Cross1 = (Ema20 crosses over ema50) or (ema20 crosses over ema100) or (ema50 crosses over ema100) or (ema50 crosses over ema200)

    Cross2 = (Ema20 crosses under ema50) or (ema20 crosses under ema100) or (ema50 crosses under ema100) or (ema50 crosses under ema200)

    rises = rise or rise1 or rise2 or rise3 or rise4 or rise5
    falls = fall or fall1 or fall2 or fall3 or fall4 or fall5

    CrossBull = cross1 and cross3
    CrossBear = cross2 and cross4

    LongEMA = (long1 or long2 or long3 or long4)
    ShortEMA = (short1 or short2 or short3 or short4)

    Bull = crossBull and longema
    Bear = crossBea and shortema

    screener [Bull or Bear] (Bull as “1”)

    #13685 quote
    Nicolas
    Keymaster
    Master

    Yes, you need to define firstly the time frame used by the code which is contained below, for each timeframe tested. Hope it’s clear to you. Cannot post code right now.

    jbyrne thanked this post
    #13686 quote
    jbyrne
    Participant
    Average

    Its still not clear, whats the syntax for the TIMEFRAME(xminutes) because with TIMEFRAME(5Minutes) i get an error message. And from what ive understood, after  TIMEFRAME is introduced to code the drop down menu to select what candle time you want to screener to run at becomes useless?

    #13696 quote
    jbyrne
    Participant
    Average

    Hi, is there a way around using TIMEFRAME? since it seems not to be very useful for short term trading.

    #13720 quote
    jbyrne
    Participant
    Average

    hi, could you explain to me how do achieve what im trying to do please.

     

    thanks

    #13723 quote
    Stef
    Participant
    Average
    TIMEFRAME(DEFAULT)
    // code related to timeframe specified in screener (selection of period)
    
    TIMEFRAME(5 minutes)
    // code related to 5 minute timeframe
    
    TIMEFRAME(1 minute)
    // code related to 1 minute timeframe
    
    jbyrne and Nicolas thanked this post
    #13725 quote
    jbyrne
    Participant
    Average

    thank you!!!

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

Calculate 2 different EMA lengths


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
jbyrne @jbyrne Participant
Summary

This topic contains 11 replies,
has 3 voices, and was last updated by jbyrne
9 years, 5 months ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 09/23/2016
Status: Active
Attachments: No files
Logo Logo
Loading...