previous bar OHLC - Page 3
Page 3 of 503 FirstFirst 1 2 3
Results 21 to 24 of 24

Thread: previous bar OHLC

  1. #21
    Quote Originally Posted by ;
    it's possible to compare worth Open Price for new candle with worth Close Price for previous candle? If possible, how to code?

    Let say:

    if(Open[1]_New_Candle gt; Close[1]_Previous_Candle)
    print Great

    vice verse

    Yes it is quite straightforward, you need to read the

    Inserted Code if( Open#91;0#93; gt; Close#91;1#93;-RRB- Printing ( Good ); else if( Open#91;0#93; lt; Close#91;1#93;-RRB- Printing (Poor );
    comparing double values could be a small minefield though, it is feasible to get an evaluation of price == price to return false... read this for more info:

  2. #22
    Quote Originally Posted by ;
    Yes it is quite straightforward, you should read the

    Inserted Code if( Open#91;0#93; gt; Close#91;1#93;-RRB- Printing ( Great ); yet if( Open#91;0#93; lt; Close#91;1#93;-RRB- Printing (Poor ); contrasting double values can be a small minefield though, it's possible to get a test of price == price to yield false... read this to get more information:
    TQ for awesome reply. I have issue. I am try to open article together with this condition. But my EA open article. My idea is available one article for every new candle which match my condition. could u fix my code?

    Double start()

    if( Open[0] gt; Close[1])
    //Opinion (Buy);
    int ticketB = -1;
    dual BuySL = Ask - BuyStoploss*PipValue*Stage;
    if (BuyStoploss == 0) BuySL = 0;
    dual BuyTP = Ask BuyTakeProfit*PipValue*Stage;
    if (BuyTakeProfit == 0) BuyTP = 0;
    ticketB = OrderSend(Symbol(), OP_BUY, BuyLots, Ask, 4, BuySL, BuyTP, Buy SE, 1, 0, Blue);
    else if( Open[0] lt; Close[1])
    //Opinion (Sell);
    int ticketS = -1;
    dual SellSL = Ask - SellStoploss*PipValue*Stage;
    if (SellStoploss == 0) SellSL = 0;
    dual SellTP = Ask SellTakeProfit*PipValue*Stage;
    if (SellTakeProfit == 0) SellTP = 0;
    ticketS = OrderSend(Symbol(), OP_SELL, SellLots, Bid, 4, SellSL, SellTP, Quotation SE, 1, 0, Red);
    Comment (No Post Open);


  3. #23

    Draws two labels: Open-Close and High-Low range of the last closed candle left of the current candle.Open: 1.26137 - Close: 1.26129 #8594; OC 8 High: 1.26263 - Low: 1.26050 #8594; HL 213

  4. #24
    This one is easy. It will be a piece of code like:

    Inserted Code Comment(Open#91;1#93;,High#91;1#93;,Reduced #91;1#93;,Close#91;1#93;-RRB-;
    plus it would display right under the current OHLC

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners. Read more.