[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 142

 

Can you advise me please?

I want to test the simplest strategy (four timeframes and in each one-directional candle), but do not know how to put a stop loss on the last fractal, how to write it in the closing condition? Thank you.

 

you need to find the last fractal through iFractal

 
sergeev:

I need to find the last fractal through iFractal

I understand it, but writing it doesn't get to me.

I am writing an EA following the MA and MACD patterns in MT4 and I have written everything, but the closing condition is not clear to me, how do I write it?

if (????)

 
do you need to put a stop loss on an order at Ordersend or close out of the market at OrderClose ?
 

Created an indicator. Works fine in a separate sub-window. Added auxiliary function - to create graphical objects - arrows in the main chart window. It does not want to create arrows and does not show an error reason. What may be the problem?

In search of the cause instead of arrows put Alert. It does not work.

Note: I am testing the indicator on a day off on the history.

While I was waiting for help I fixed the code. Everything is working.

 
sergeev:
do you need to put a stop loss on an order at Ordersend or close out of the market at OrderClose ?
There's such bullshit: four timeframes, from Chaika to five-minute, if in each of the last candle becomes in one direction - we open a deal or a fixed 15-20 points with a stop-loss of 30, or a stop-loss is placed on the last opposite fractal.
Maybe it will be clearer this way, otherwise I do not know what to answer your question. Maybe you have encountered such a system? If it doesn't work, I don't want to waste my time on it.
 
BooGUY:
There's the bullshit: four timeframes, from chacha to five-minute, if in each of the last candle turns in the same direction - we open a deal or a fixed 15-20 points with a stop-loss of 30, or stop-loss is placed on the last opposite fractal.

Ask more specific questions and you will get an effective answer.

If you need 30 pips for a stop loss, that's one thing.

If you need a stop-loss on a fractal, that's different.

 
Please tell me how to make the written program run as if it were running in online mode. That is, testing the strategy would be slowed down say . At that speed would be as fast as you want it to be? What are the settings for this? So that everything runs at that speed with Alert()-s .
 
sergeev:

Ask more specific questions and you will get an effective answer.

if you need 30 pips for a stop-loss is one thing.

if you need a stop-loss on a fractal, that's another.

On the fractal! I have tried it with stop-loss and it is losing. I would like to try it with stop-loss on fractals, but I do not know how to write it in the condition. Or how to write it in an EA, I have written an entry condition, something like this

if(iOpen(NULL,PERIOD_H1,1)<iClose(NULL,PERIOD_H1,1)&&

iOpen(NULL,PERIOD_M30,1)<iClose(NULL,PERIOD_M30,1)&&

iOpen(NULL,PERIOD_M15,1)<iClose(NULL,PERIOD_M15,1)&&

iOpen(NULL,PERIOD_M5,1)<iClose(NULL,PERIOD_M5,1)

{...???

}

 
Davit:
Please tell me how to make the written program run as if it were running in online mode. That is, testing the strategy would be slowed down say . At that speed would be as fast as you want it to be? What are the settings for this? So that everything runs at that speed with Alert()-s .

In the tester window there is a "Visualisation" function. Check the box and adjust the speed. Don't forget to set the correct start date for the visualisation.
Reason: