Buy or Sell at set time and price change on any market.

Viewing 3 posts - 16 through 18 (of 18 total)
  • Author
    Posts
  • #237138 quote
    Andre Vorster
    Participant
    Senior

    I need the buy also to take into consideration certain indicator values.
    I used MACD, Stochastic, EMS and SMA values to the code but the results does not seem to take into account the indicator values.
    I will be grateful if anybody can help me please. Sure I’m just missing some small change to the existing code.
    Thank you.

    What I tried (with my limited knowledge of code).
    No matter which direction I set the < or > the results stays the same which tells me what I do isn’t working ;-(

    indicator1 = MACDSignal[2,26,9](close)
    indicator2 = MACDline[2,26,9](close)
    indicator3 = MACD[2,26,9](close)
    mac = (indicator2 > indicator1) //used all combinations > < here which does not have an effect.

    indicator4 = Stochastic[14,3](close)
    indicator5 = Stochastic[14,7](close)
    stoch = (indicator5 > indicator4) //used all combinations > < here which does not have an effect.

    indicator6 = Average[20](close)
    indicator7 = Average[50](close)
    aver1 = (indicator6 < indicator7) //used all combinations > < here which does not have an effect.

    indicator8 = ExponentialAverage[20](close)
    indicator9 = ExponentialAverage[20](Open)
    ema = (indicator10 > indicator11) //used all combinations > < here which does not have an effect.

    #237189 quote
    GraHal
    Participant
    Master

    Try adding below at bottom of your code and remove the // so as to show one without // at a time.

    So start with mac, when True you will see a 1, if never True, you will see a 0 line.

    Do same for the others and report back

    GRAPH mac
    //GRAPH stoch
    //GRAPH aver1
    //GRAPH ema

    PS I guess ema is a typo and you meant (indicator8 > indicator9)

    #237202 quote
    Andre Vorster
    Participant
    Senior

    Thank you for the reply.
    I’ll give your suggestion/code a go.

    I’m still looking for code that works on short time frame. Quick in and out.
    With a quick in and out on short time frame one can make the most of the market no matter the long term market trend.

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

Buy or Sell at set time and price change on any market.


General Trading: Market Analysis & Manual Trading

New Reply
Author
Summary

This topic contains 17 replies,
has 7 voices, and was last updated by Andre Vorster
1 year, 5 months ago.

Topic Details
Forum: General Trading: Market Analysis & Manual Trading
Language: English
Started: 08/27/2024
Status: Active
Attachments: 1 files
Logo Logo
Loading...