Reply

SQ Pseudo Explanation Help Needed

2 replies

gentmat

Customer, bbp_participant, community, 234 replies.

Visit profile

7 years ago #115244

Below is one strategy Generated by SQ3, I always wonder the following:
 
== Entry conditions
LongEntryCondition = (TEMA(55) Crosses Below SMA(263))
ShortEntryCondition = (TEMA(55) Crosses Above SMA(263))
 
 
So basically the ea Buy if Tema Crosses Below SMA  And Sell if the opostite condition is met.
 
But then you go down to Entry Condition (Specific) 
The buy condition is different 
 
if LongEntryCondition is true {
   if No position is open then Buy at TEMA(53) + (0.3 * ATR(155)) Stop;
   Stop/Limit order expires after 35 bars.
 
   Stop Loss = 190 pips;
}
 
 
SO which one SQ is using the first one ? which is SMA and Tema 
Or
Tema And ATR 
 
 
 
 
Full Pseudo : 
 
 
——————————————————————–
Pseudo Source Code of Strategy 0.119088
  with parameter names.
 
  Generated by StrategyQuant version 3.8.1
  Generated at Wed Jun 15 09:46:00 GMT 2016
                                                          
  Tested on EURUSD, H1, 04.11.2003 – 29.03.2013
  Spread: 1.0, Slippage: 1.0, Min distance of stop from price: 5.0
——————————————————————–
====================================================================
== Entry conditions
==================================================================== 
LongEntryCondition = (TEMA(55) Crosses Below SMA(263))
ShortEntryCondition = (TEMA(55) Crosses Above SMA(263))
 
 
====================================================================
== Entry orders
====================================================================
— Long entry
if LongEntryCondition is true {
   if No position is open then Buy at TEMA(53) + (0.3 * ATR(155)) Stop;
   Stop/Limit order expires after 35 bars.
 
   Stop Loss = 190 pips;
}
 
— Short entry
if ShortEntryCondition is true {
   if No position is open then Sell at TEMA(53) + (-0.3 * ATR(155)) Stop;
   Stop/Limit order expires after 35 bars.
 
   Stop Loss = 190 pips;
}
 
====================================================================
== Exit orders
====================================================================
— Long exit
if MarketPosition is Long {
   if (EMA(200) Crosses Below SMA(23)) {
      Close position at market;
   }
}
 
— Short exit
if MarketPosition is Short {
   if (EMA(200) Crosses Above SMA(23)) {
      Close position at market;
   }
}
 
 

0

mikeyc

Customer, bbp_participant, community, 877 replies.

Visit profile

7 years ago #137771

It is because the strategy is using pending orders, rather than market orders.

 

The first entry conditions determine whether to create a buy or sell stop.  They are simply a yes/no:

LongEntryCondition = (TEMA(55) Crosses Below SMA(263))

ShortEntryCondition = (TEMA(55) Crosses Above SMA(263))
 
If any one of them is true, the next logic is at what price to place the pending order:
 
if LongEntryCondition is true {

   if No position is open then Buy at TEMA(53) + (0.3 * ATR(155)) Stop;
   Stop/Limit order expires after 35 bars.


   Stop Loss = 190 pips;
}

So, here the price is determined by the result of TEMA(53) + (0.3 * ATR(155))

 

There is an expiry of 35 bars, so if the order is not hit (the market price does not activate this pending order), it is deleted after 35 bars have elapsed.

 

 

 
 

0

gentmat

Customer, bbp_participant, community, 234 replies.

Visit profile

7 years ago #137790

Okay Got it ! Thanks a lot mikeyC

 

BTW from 1 day i made a shoutout in a post for you 😛 i was surprised you did show up as you always do.

0

Viewing 2 replies - 1 through 2 (of 2 total)