How to write a Heiken Ashi

Forums ProRealTime English forum ProOrder support How to write a Heiken Ashi

Viewing 8 posts - 1 through 8 (of 8 total)
  • #140342
    Hi
    I would like to write a code where after a EMA crosses over another I buy a contract and sell when the Heiken Ashi (HA) turns from green to red.
    The EMA element is fine but cannot get the HA bit.
    I have the basics of the below but cannot work out how to write the code to get from green to red, a then vice a versa when going short from red to green

     

    Can anyone help please?
    #140348

    There you go:

    COLORCHANGE will be true whenever two adjacent HA candlesticks have different colours.

    #140459

    Paulchal – I have tidied up your post. Please always use the ‘Insert PRT Code’ button when putting code in your posts as per the forum rules.

    #140517

    Hi

    I applied the above code but cannot get it to work. I had to //REM xHigh and xLow as the system said it was not included in the code.

    Same idea as before, When the MACD crosses over buy on a green HA. Close that order when the HA turns red (but do not automatically sell to open a new position).

    Any pointers to where I am going wrong would be appreciated.

    Sorry cant see where to “insert PRT code”.

     

    #140520

    You posted in the wrong forum, this is a strategy and therefore the correct support forum is ProOrder.

    To exit a Short trade you need EXITSHORT, since BUY will open a Long trade.

     

    #140561

    You do not need to start a new topic, please append your further questions here, if relatedto the same topic.

    #140567

    Sorry about any confusion I thought you wanted me to open a new post.

    I tried the EXITSHORT and positions still did not open. There was a trade this afternoon that would have made 73 points. MACD crossed under and red HA candle present afterwards. Short position did not open.

    #140613

    Line 11 is correct.

    Replace line 12 with:

    and use EXITSHORT.

     

Viewing 8 posts - 1 through 8 (of 8 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login