How to code? - page 240

 
Sendra:
Hi, Guyver, thanks for replying. I tried that, but this indicator uses box as well. And doesn't matter where I put the TimeDayOfWeek, it only affects the box, not the fibo.

Hi,

I see, well i am not aware of this indicator i informed you what could be used to stop those items on certain days to display .. you will need to put the code which displays all items fibo and box for a check not just the box.

-guyver

 

xx3xxx

well, although a little weird talking about this at "how to code" thread but i think ( completely personal opinion) that is fibonacci works great when there are clusters found alone it is just a line on the chart.

-guyver

 

Guyver, thanks for the offer.

But I'm not yet thoroughly study this strategy yet. So, adding another will only muddle my thinking and left me back on square one. So, I'll keep in mind your offer for now.

Anyway, I don't use fibo as in retracement or what. I just use it in coding since it seems a lot practical than drawing several lines with several commands.

Thanks.

 
Sendra:
Guyver, thanks for the offer.

But I'm not yet thoroughly study this strategy yet. So, adding another will only muddle my thinking and left me back on square one. So, I'll keep in mind your offer for now.

Anyway, I don't use fibo as in retracement or what. I just use it in coding since it seems a lot practical than drawing several lines with several commands.

Thanks.

hey wait, wow what offer lol ... i was just commenting on xx3xxx comments ... if you are pointing to what i wrote above it is a general comment that's all. Sure use your ways as you see it fit.

I will just generalize a bit more here to be more transparent and pls note that this is just my opinion.. ok here it goes.. the cool thing about fibos if done correctly is to find several support or resistance areas confluence near each other.. You do that by taking several high's and lows depending on trend ( there many ways to find trend such as macd,stocs etc etc to name few) and take retracement of these this way a good support and resistance zone is found when retracing or expected turn around when expanding.

-guyver

 

just my personal opinion on FIBO

we know that it is a standard MT4 function

similar to pivot

I think most people talk about FIBO in web site

has NO IDEA where will the exit price or target price would be

they only talk about FIBO as they don't want to disclose their own template or INSIGHT into the market

they probably play daily, so more people bet, more will broker make it (GBP/USD) unprofitable by moving the candle violently

but it is good for daily trader, who trade just simply and daily, probably need brokers to move the price violently, so they could hedge and get B/E if they really get it wrong

28 to 67% retracement make no sense to me

160 260 % is good for exit price reference point in the old days

and fibo usually on daily H4, even you may see some unreliable fibo on micro-levels , smaller TF

I say this here, as I do like to see flourish of different school of thought

but many occasion, we make a template or indicator perfect

BUT -- at the end, we find that it is untradable , even it is perfect

--- my own opinion on fibo, but you may like it -- as there are so much YouTube video

====

this week, I am keen to FIND THE PERFECT price level to enter

been studied into 5M and 15M , some indicator give horizontal line during cluster candle or ranging quiet period, break of it show good entry or the horizontal line is good entry

now , I am thinking , whether bollingerband alike, the edges of the bolling BANDS itself is a good entry point during flat market or ranging market

i.e. I just look for an indicator to show it is a GOOD price to enter

without giving any entry signal from this indicator, so I could set little SL

ooh thanks -- don't know that fibo work on cluster candles

oooh, if you are interested in a SL indicator that I develop, you could PM me

maybe you can make it viable to use it to set dynamic SL or dynamic TP

I did that myself, but a bit too fussy to fine tune it (just 1 parameter for FEW fine pip adjustment, all the other INPUT , I make it very automatic -- "I am lazy not to spot the entry, SL / TP when I pull a chart out - but I spend ages to programme it by myself")

[ the overall thing should be quite GOOD and logical too -- mainly measure the

appropriate averages of CANDLES pips length ]

should work in this market -- spend couple of month to do it -- so the code could be as long as an ESSAY , you see the comment on the left side, that is MINE indicator

 

xx3xxx i dont work much on indies , ea is what interests me the most .. but see if you can play around with this shell code i am using it to brainstorm an EA idea .. it is an ea though so copy there to check

-guyver

Files:
candles.mq4  5 kb
 

guyver, do you think it is POSSIBLE

or probably INVALID request or no way to code it in online chart

>>>> >>

https://www.mql5.com/en/forum/180082

>>

maybe it is possible to flash some LIGHT in xx:01. xx:02 until xx:21

got stuck with this line in the code below >> datetime T_Bar= Time [ Ind_Bar ];

then ... if (T_Bar < Time_On) break;

what does thsi suppose to do

 

Small EA problem , much apreciated

Hi there. do any of you know the code that I can use to see if there are any open orders on the account . I want my EA only to enter trades only when there are no active trades....

Thanks a lot!

 
Xlr8er:
Hi there. do any of you know the code that I can use to see if there are any open orders on the account . I want my EA only to enter trades only when there are no active trades.... Thanks a lot!

Hi Xlr8er,

The quick way you can check is with the code below

int cnt = 0;

for (int i = OrdersTotal() - 1; i >= 0; i--)

{

OrderSelect(i,SELECT_BY_POS,MODE_TRADES);

if (OrderType() == OP_BUY) cnt++;

if (OrderType() == OP_SELL) cnt++;

}

Then you can check to see if the count value is greater then 0 if it is then there are orders... if you'r EA uses Magic Numbers and if you want to you can also check with orders that belongs to that EA by using OrderMagicNumber() etc and to check for only a specific symbol you would add OrderSymbol() as well..

anyhow the above code does it rather quick way..

OrdersTotal() is used to count how many orders which are there and open

OrderSelect() selects the order by position 0,1,2,3

OrderType() checks what type of Order and counts

-- guyver

 

MTF-STC EA ,need help

hi

i get an EA base on the STC_COLOR,and it can work well. but i want to add the #MTF-Schaff Trend Cycle.mq4 to the EA. and i load the EA in the 15MIN timeframe,but it does not work,it can not order automatically.

maybe there is some problem in these codes.hope someone can help me. thank you all.

// expert start function

int start(){int j=0,limit=1;double BV=0,SV=0;BV=0;SV=0;double STC0, STC1,STC2,mtfstc0,mtfstc1,mtfstc2; // "STC0" added

if(CntO(OP_BUY,Magic)>0) TL=1;if(CntO(OP_SELL,Magic)>0) TL=-1;for(int i=1;i<=limit;i++){

STC0=iCustom(Symbol(),0,"STC_COLOR",STCPeriod,FastMAPeriod,SlowMAPeriod,0,i+2);

STC1=iCustom(Symbol(),0,"STC_COLOR",STCPeriod,FastMAPeriod,SlowMAPeriod,0,i+1);

STC2=iCustom(Symbol(),0,"STC_COLOR",STCPeriod,FastMAPeriod,SlowMAPeriod,0,i);

mtfstc0 = iCustom(Symbol(),0,"#MTF-Schaff Trend Cycle",60,0,i+2);

mtfstc1 = iCustom(Symbol(),0,"#MTF-Schaff Trend Cycle",60,0,i+1);

mtfstc2 = iCustom(Symbol(),0,"#MTF-Schaff Trend Cycle",60,0,i);

string BUY="false";string SELL="false";

if((STC1STC1) && (mtfstc1mtfstc1))BUY="true";

if((STC1>STC0&&STC2mtfstc0&&mtfstc2<mtfstc1))SELL="true";