You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Don't use a fixed factor for "10.5*P_Point/Time_Frame". Rather use a External Variable for that ratio. That way you can change and optimise the "Range_Ratio" for different periods as Market Conditions change. Also, you do not have to calculate or even set the "Time_Frame" variable. It already exists - it is called "Period()".
Also, do not use constants in your code like in "if(Close[0]-PT_Buffer[0]>=5*Pips_SL)". Use a externally declared variable (like in "Range_Ratio") so that you can change and optimise in testing:
There is still more bugs you need to fix. Keep developing your code and testing it. Make your code readable and understandable. Don't just put everything into one line. That makes it difficult for you to debug. Divide the code up into logical blocks so that you can test and make sure each block is working correctly.
Hello, FMIC
I have rearrange my code again to let it more readable and understandable as you request; but I really can;t find any bug, or maybe do you mean the bugs, such as "Move_Stop = 30; ", I should change "30" by some variable?
the code after rearranged in this attachment. I hope I will not waste you much time.
always thank you!
Hello, FMIC
I have rearrange my code again to let it more readable and understandable as you request; but I really can;t find any bug, or maybe do you mean the bugs, such as "Move_Stop = 30; ", I should change "30" by some variable?
the code after rearranged in this attachment. I hope I will not waste you much time.
always thank you!
There is still several bugs and use of constants:
There is still more bugs, but you need to pay more attention to what was written before by me and other posters and follow through on your own, checking the manual and other examples on this site to correct your own bugs and logic of the EA.
We cannot do it all for you. If you want to have our help you need to put more effort into your work and learning of MQL4 and Forex Trading.
There is still several bugs and use of constants
There is still more bugs, but you need to pay more attention to what was written before by me and other posters and follow through on your own, checking the manual and other examples on this site to correct your own bugs and logic of the EA.
We cannot do it all for you. If you want to have our help you need to put more effort into your work and learning of MQL4 and Forex Trading
FMIC, thank you very much for all your patience and time.
My modifications are as below(two Parts, Part I is the modification as you request; Part II is the modification by myself ) :
Part I:
i think, and until now I don;t consider well,so just let it as 0, and I know it should be used as stop loss, thank for your reminding.
in addition, is there necessary to do the same for "orderclose()" or "ordermodify()"? and if it is, I don;t know how to do better when they fails;
I find ordermodify() often fails and get error 1, and I think it is because of data.
1. int Signal = iCustom(NULL,0,"Test_Ind",Seek_Period_Ind,Bar_Ignore_Ind,Range_Ratio_Ind,Delta_Ratio_Ind,1,0); change constants as extern variables.
2. int counted_bars = IndicatorCounted() ; these code have been changed to avoid always recount 1 bar. if( counted_bars < 0 ) return(0) ; else int Limit = Bars-counted_bars-1 ;
3. while( CNT <= Bar_Ign ) changed from "while ( CNT <= 3)" and set "Bar_Ign" as extern variable.
Thanks again, I hope there is no other bus.
I am going to stop the list here because you still have old bugs which you did not bother to find, bugs which I identified for you which you did not bother to research and fix properly, and now you have even more bugs created with the new changes.
If you want me to do all the work, then fine, we will head over to "jobs" section and we can strike a deal where you PAY ME to do the work and write an EA an Indicator for you!
If you do not want that, then you have to put in more effort to find and fix your own bugs. Do some work by learning, researching and developing your code properly. Don't just put code together any old way. Plan your code, verify the logic, consider errors, consider when things can go wrong, consider future possibilities and properly structure your code accordingly.
I am going to stop the list here because you still have old bugs which you did not bother to find, bugs which I identified for you which you did not bother to research and fix properly, and now you have even more bugs created with the new changes.
If you want me to do all the work, then fine, we will head over to "jobs" section and we can strike a deal where you PAY ME to do the work and write an EA an Indicator for you!
If you do not want that, then you have to put in more effort to find and fix your own bugs. Do some work by learning, researching and developing your code properly. Don't just put code together any old way. Plan your code, verify the logic, consider errors, consider when things can go wrong, consider future possibilities and properly structure your code accordingly.
by Move_Stop_Line() or reverse Signal.
// while() loop together with function iWait() maybe can resolve these; but I never find anybody use it in these situation.
// Do it properly, all Order functions OrderSend(), OrderClose(), OrderModify() need to be verified and errors checked and procedures followed. // Don't just repeat in hopes that second time will work. Do proper error follow-up. // Always verify the result of the OrderSend() and any resulting errors. Don't assume it will always work. OrderSend(Symbol(),OP_BUY,1,Ask,3*Pips_Slip,Ask-SL_Point*Pips_SL,TP_Point,0,0,0,0);
// sorry, I misunderstand your this meaning. in the fact I am not familiar with "IsTradeContextBusy()" and "IsTradeAllowed()" . maybe just "while()" and "IsTradeAllowed()" is ok?
// NOT DONE. Do it properly! // "IsTradeContextBusy()" and "IsTradeAllowed()" must be monitored asynchronously and not cause any delays or fixed loops! // You only check it once and then assume it will work after the sleep period. // If properly written, you will never need the sleep and not cause delays to your Order processin // Rather wait/sleep if the order fails and not before, because the bid/ask price my change while you wait. OrderSend(Symbol(),OP_BUY,1,Ask,3*Pips_Slip,Ask-SL_Point*Pips_SL,TP_Point,0,0,0,0);
if( MathAbs( Close[0] - OrderStopLoss() ) > Move_Stop*Pips_SL ) never has chance to consider a loss as profit in this EA.
// NOT Done. You completely ignored it. // MathAbs() will consider a Loss as a Profit ( rather check if order is long or short ) Profit_Point = NormalizeDouble( MathAbs( Close[0] - OrderOpenPrice() )/Pips_SL,0 ) if( MathAbs( Close[0] - OrderStopLoss() ) > Move_Stop*Pips_SL )
Sorry, I offer no more help until you demonstrate an effort into researching the information given here on this thread or the many other threads with useful information. There is plenty of code examples in the CodeBase on this site with good demonstrations on how to properly write the code.
Alternatively, you PAY ME to write the code you want. Head over to the Jobs Section of this site and I will take part in the proceedings. There will be most probably other candidates applying to do the work. You have merely to negotiate prices and durations with candidates and strike a deal with one of them, be that myself or any other candidate you may wish to choose.
Regards,
FMIC
Sorry, I offer no more help until you demonstrate an effort into researching the information given here on this thread or the many other threads with useful information. There is plenty of code examples in the CodeBase on this site with good demonstrations on how to properly write the code.
Alternatively, you PAY ME to write the code you want. Head over to the Jobs Section of this site and I will take part in the proceedings. There will be most probably other candidates applying to do the work. You have merely to negotiate prices and durations with candidates and strike a deal with one of them, be that myself or any other candidate you may wish to choose.
Regards,
FMIC
Ok, whatever thank you!