Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 399

 
I traded with p_s_3MA_Trall_NoLoss (EA on 3 Machs with trall) on demo account and cent account at Alpari, not bad results if trading in US and Asian session. In parallel I manually opened trades using the same strategy, only using J2JMA slips, results are 15% better. If they are inserted in my EA then the quality of opening and closing will be even better, especially I liked trailing stops, I wish they will be virtual.
Please advise how to insert J2JMA sliding indicator into EA code instead of Mashka to check and compare. I have attached indicator, its description and EA code.
Thanks in advance for the help!!!
 
fenix74:
I traded with p_s_3MA_Trall_NoLoss EA (EA on 3 Machs with trall) on demo account and cent account at Alpari, results are not bad if trading in US and Asian session. In parallel I manually opened trades using the same strategy, only using J2JMA slips, results are 15% better. If they are inserted into my EA then the quality of opening and closing will be even better, especially I like trailing stop, I wish it will be virtual.
Please advise how to insert J2JMA sliding indicator into my EA code instead of Mashka, to check and compare. I attached indicator, its description and EA code.
Thanks in advance for your help!!!

Replace MA variables with indicator variables in EA code (all three sets):

extern int Length1 = 5; // глубина  первого сглаживания 
extern int Length2 = 5; // глубина  второго сглаживания 
extern int Phase1  = 100; // параметр первого сглаживания, изменяющийся в пределах -100 ... +100, влияет на качество переходного процесса; 
extern int Phase2  = 100; // параметр второго сглаживания, изменяющийся в пределах -100 ... +100, влияет на качество переходного процесса; 
extern int Shift   = 0; // cдвиг индикатора вдоль оси времени 
extern int Input_Price_Customs = 0;/* Выбор цен, по которым производится расчёт индикатора 

Then replace the MA call lines with the J2JMA call:

double MA10=iCustom(NULL,timeframe_1,"J2JMA",Length1,Length2,Phase1,Phase2,Shift,Input_Price_Customs,0,0); //последнее значение - сдвиг, заменить на те же значения что были для МА
 
evillive:

Replace MA variables with indicator variables in EA code (all three sets):

then replace the MA call lines with the J2JMA call:



Many thanks evillive for the prompt reply, I will try it. So far, only changed the types of mashups, not much experience and knowledge yet, learning :)
 
Where can i find mt4 on windows phone8 ?
 

nowhere.

 
artmedia70:

You're looking in the wrong direction. Are you making for the tester, or for the real thing? The difference is significant.

If for real, forget about the flags that can be lost in abnormal situations. It's better to look for everything in the trading environment.


You can argue here...I mean for real...If it's real then it shouldn't come to abnormal situations. Everything has to end in an orderly fashion. At least a UPS should be available. Everything should be normal, at least a UPS. The only abnormal situation is when a computer dies unexpectedly. Everything else is normal, although it can be unpleasant... Although I agree, flags, if possible, it's better not to use them in the real world....
 
Sepulca:
It could be argued...I mean for the real world...If it's real then it shouldn't come to an abnormal situation. Everything has to end in a normal way. At least a UPS should be available. Everything should be normal, at least a UPS. The only abnormal situation is when a computer dies unexpectedly. Everything else is normal, although it can be unpleasant... Although I agree that flags, if possible, it's better not to use them in the real world....


The UPS is available but the ISP router in the stairwell is not powered by it )) An emergency situation as it is )))

Good thing I had the money for a Microcontik with 3G redundancy.

Who is kind today, describe in detail how and what to use instead of flags?

 
vadynik:

What might be the problem

is CLR_NONE but the tags are still placed, they are black when modified)


What about without CLR_NONE? You mean don't write anything there at all?

And for modification you set your colour, in a completely different command.

 
evillive:

There is a UPS, but the ISP router in the stairwell is not powered by it ) Emergency situation as it is )))

Good thing I had money for a Mikgotik with 3G backup.

Who is kind today, describe in detail how and what to use instead of flags?

It would be a good idea to power the router from UPS as well. This is not an emergency situation, rather an unpleasant one....

At the risk of attracting a lot of criticism, I did the following. I created a global variable for each order

string gtts=StringConcatenate(pref,WindowExpertName(),Symbol(),OrderTicket());

This was an attempt to make a trawl by time. This variable contained the time of last modification of the order.

if(ModifyOrders(Symbol(),OP_SELL,OrderTicket(),magic,-1,sl,-1,0)){
                      if(DEBUG) Print("INFO Order #",OrderTicket()," переведен в безубыток в ",TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES|TIME_SECONDS));// Отладочный принт
                      GlobalVariableSet(gtts,(TimeCurrent()-OrderOpenTime())/60.0);

Everything went through without a hitch, though it would probably slow down considerably during testing.

As a result, whatever abnormal situation occurs, the Expert Advisor returns to what it has at the moment...

P.S. Slightly modified KimIV's functions were used, so I won't lay them out...

 
khorosh:


Thank you Yuri.
I will try to use your code, but later, as it needs to be disassembled and understand the principle of work.
Above described step is not difficult, then I will have to disassemble each custom function of Mr. "N", and this has the highest degree of complexity, respectively, will take a long time, from 3 to 10 hours (as they say: - One day. -).

I'll finalise my code, it's "my habitat" and there's nothing to study in it.

Thanks again, Yuri.




borilunad:
1 - He can't do anything! 2 - Only wants to be written to! 3 - It is useless to explain! 4 - No logic at all! 5 - An incorrigible loser!

1 - Relatively, yes.
2 - Helped me understand the situation.
3 - Not useless at all.
4 - Due to the fact that you answer - yes.
5 - Finished the semester with five B's, all other grades - A's.

You have broken the rules of the forum, as have I.
Now your account is worthy of a warning, my account is worthy of a ban.

Please excuse the irrational actions (responding to criticism).
Reason: