Rectangle Fill color

How to create strategies and indicators
Message
Author
Mitja
Posts: 5
Joined: Sun Nov 16, 2014 11:35 am

Rectangle Fill color

#1 Postby Mitja » Sun Nov 16, 2014 1:19 pm

Hello,

I am building strategy which include painting rectangle object (supply and demand). Everything is working fine except rectangle fill color(OBJPROP_FILLINSIDE and OBJPROP_FILLCOLOR). Let me copy some code to view:

Code: Select all


        //if rectangle is bellow current price then use color blue
        if (Bid > ( ObjectGet('Rectangle '+FloatToStr(i),OBJPROP_PRICE1))) And (Bid > ( ObjectGet('Rectangle '+FloatToStr(i),OBJPROP_PRICE2))) then
        begin
          ObjectSet('Rectangle '+FloatToStr(i), OBJPROP_COLOR , DeColor);
          ObjectSet('Rectangle '+FloatToStr(i), OBJPROP_FILLINSIDE , 1);
          ObjectSet('Rectangle '+FloatToStr(i), OBJPROP_FILLCOLOR , DeColor);
        end;



Code works on border color set (OBJPROP_COLOR), but does not work on other two lines OBJPROP_FILLINSIDE and OBJPROP_FILLCOLOR. I know that code is OK, if I put this lines on indicator every thing works.

Becaus I am new in programing, I have another question.

It is posible to code strategy/indicator to know in wich time frame is rectangle been drawn and remove it form other timeframes? Rectangle is drawn by hand. And I know that can be done in properties, but is time consuming.

Thank you for your help.
Mitja

eman
Posts: 1
Joined: Sat Feb 07, 2015 1:02 am

Re: Rectangle Fill color

#2 Postby eman » Sat Feb 07, 2015 1:05 am

my google's 1st result is from DelphiBasics which didn't show 'Use Dialogs' in its example, my bad----should look more :-)
__________________
Usman


Return to “FT API”

Who is online

Users browsing this forum: No registered users and 2 guests