View Single Post
  #1   Report Post  
babapusy babapusy is offline
Junior Member
 
Posts: 4
Default Generating Buy/Sell signals accordingly...

Hello,
I need solution to two problems:

First,

sell 9
hold_sell
hold_sell
hold_sell
hold_sell
sell 8
hold_sell
hold_sell
hold_sell
take_profit 7

to calculate 9-7=2, and to ignore the second sell signal(fake signal, there can be many of them in between).

Second,

Depending on the generated BUY signal for example, to generate STOP_LOSS or TAKE_PROFIT signal in a given condition. For example to generate BUY signal at price 10 pips above the Upper Bollinger Band and depending on the generated buy signal to generate, let's say, STOP_LOSS if the difference between the last value and the BUY is -10 pips, or TAKE_PROFIT if the difference between the last value and the BUY signal is +10 pips.
To be more clear to you what I mean, is if the formulated condition generates BUY in B1 from A1, then to look for values A2-A1,A3-A1,A4-A1,A5-A1 etc until it meets the condition -10 or +10 pips(to generate STOP_LOSS or TAKE_PROFIT accordingly) and to ignore the in between BUY(fake) signals

I would be very thankful if someone wants to help me out solve this problem. I have tried many combinations without success.