how can i find the price of previous MA crossover (buy or sell) signal

Back to topics list To post a new topic, please log in or register
avatar
4
sajib0189 2015.12.13 16:50
 

hlw coders

i m in little trouble in coding of EA, i made it according to MA crossover signal

if signal buy its cancel previous sell signal and placed new buy order

also same for sell signal..

i already made it.... but i m in trouble to find what was previous signal and at what price from the latest signal casue if the both signal very near in minimum 25 pips the latest signal not placed open order.

so i need previous buy or sell crossover signal in what price the cross...can anybody help me plz




avatar
120
DeanDeV 2015.12.14 06:59 #
 
sajib0189:

hlw coders

i m in little trouble in coding of EA, i made it according to MA crossover signal

if signal buy its cancel previous sell signal and placed new buy order

also same for sell signal..

i already made it.... but i m in trouble to find what was previous signal and at what price from the latest signal casue if the both signal very near in minimum 25 pips the latest signal not placed open order.

so i need previous buy or sell crossover signal in what price the cross...can anybody help me plz




Use:

 

iMA()

 

avatar
4
sajib0189 2015.12.14 16:02 #
 
DeanDeV:

Use:

 

 

i already used iMA() and getting result, but my problem is how can i get, what was previous crossover either buy or sell?


in my screenshot latest crossover is buy and no problem for that, how i get the previous sell cross over price by code for my EA?


avatar
120
DeanDeV 2015.12.14 16:31 #
 
sajib0189:

i already used iMA() and getting result, but my problem is how can i get, what was previous crossover either buy or sell?


in my screenshot latest crossover is buy and no problem for that, how i get the previous sell cross over price by code for my EA?


I'm no expert, however, I would save the price at each long/short crossover and then reset those prices when a new long/short crossover happens.
avatar
4
sajib0189 2015.12.15 07:23 #
 
DeanDeV:
I'm no expert, however, I would save the price at each long/short crossover and then reset those prices when a new long/short crossover happens.

that also helpful, if i can save the crossover price

what is the code for saving crossover price?

is it save in csv or excel?  better if i get the code for save in crossover price & time, and read it later


thanks

avatar
12995
WHRoeder 2015.12.15 14:49 #
 
sajib0189: what is the code for saving crossover price?
RFTM Static Variables - MQL4 Documentation
Back to topics list  

To add comments, please log in or register